I'm using JCarouselLite on my website www.peach-designs.com and my problem is when it loads in Chrome, the entire page doesn't load - just the navigation bar, rather than the image scroller I have. When I click 'Home on the navigation bar, everything displays fine (index.php), but not the initial load (which should ideally be index.php shouldn't it).
I have had advice that the problem is JCarousel, my other problem is, I have JCarouselLite with no control buttons or anything, and the code looks completely different to JCarousel. Is there anybody who has encountered this problem with JCarouselLite who can help?
Hope you can help,
Kind Regards,
Snakespan
Try to use
$(window).load()
rather than
$(document).ready()
, it works for me!
Full working code after I applied Kainnan fix:
$(window).load(function () {
$("#prodCarousel").jCarouselLite({
auto: 7000,
speed: 1500,
scroll: 4,
visible: 4
});
});
Related
Im using a theme to build a website and at the bottom of the browser window (not the site) there is the following message:
$(document).ready(function(){ $("#testimonial-slider").owlCarousel({ items:1, itemsDesktop:[1000,1], itemsDesktopSmall:[979,1], itemsTablet:[768,1], pagination: true, autoPlay:true }); });
I am not a programmer so don't understand Javascript, I am not using Owl Carousel and the home page seems to be the only page this message is on.
Just wondering how I rectify this, or just remove it if it is some sort of stray piece of code.
Any help would be really appreciated,
thanks
I am trying to get the header to have a shadow after I scroll down the page 'x' amount. I have a JSFiddle included at the bottom with the script I have been trying to use.
$(document).ready(function() {
$(window).scroll(function() {
if ($(document).scrollTop() >= 100) {
$('#header').addClass('mdl-shadow--4dp');
}
});
});
JSFiddle
So as soon as I took your JS fiddle code locally, and forgot to load your external resources. I was alerting on scroll, and I was getting those alerts, but once I loaded your external resources the scroll events broke.
So I knew it has something to do with one of the frameworks, and figured out its material-design-lite. Someone experienced this issue before and opened an issue about on their github repo here
The solution is to capture the scroll events on 'mdl-layout' instead of document & window
checkout this fiddle
I'm using fancybox (version: 2.1.5) to show pop ups on my site and it does not work properly, it throws an error
undefined is not a function
Every time when I'm opening and closing fancybox. Here the screenshot: http://grab.by/A5MK
I brought it to work partially and seems it fullfil my needs. But every time when I close it, background stays gray out and I need to click on it one more time to make it go away.
I can't puzzle out what can cause such inconsistency. Does that affiliated with jQuery version (I have it 1.7.1) or with peculiarities of fancybox? I would like to know if someone has encountered with such problem and how can I work around that? Is it feasible to get it to work or I should use another lightbox plug in?
Note: site created with Wordpress CMS.
Sorry for such convoluted and long-winded specification, I have tried my best to provide all information connected with problem.
Thanks in advance.
Edit: I don't know in what extent my code can be helpful on this occasion, but anyway here is my code
$("a.fancybox-purchase-inline").fancybox({
prevEffect: 'elastic',
nextEffect: 'elastic',
autoSize: true,
closeBtn: true,
afterLoad: function () {
set_billing_state_placeholder();
show_billing_state();
}
});
I was wondering if there is a way to use a fallback option if the browser the website is opened in is Safari or Chrome?
At the moment my problem is with JCarouselLite which is not working properly when the home page loads, so I was wondering if someone knew of a way to counter this by disabling javascript in those browsers?
The full description of the problem I'm having is on Problem with JCarouselLite in Chrome.
Hope someone can help,
Kind Regards,
Snakespan
Put your jCarouselLite script in the window.onLoad() function.
For example
$(window).load(function() {
$("#car_scroller").jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
visible: 7,
scroll: 7
});
});
I used jQuery tools to create a tabs setup, and I would like to incorporate the fade effect, but when I try to do so, it bombs out, here is my code:
$(function() {
$("#flowtabs").tabs("#flowpanes > div", { history: true, effect: 'fade' });
});
I am assuming that it's because I am also enabling the tabs history?
I am kinda new to all of this, so please be patient! :-)
Thanx in advance!
I had a problem with fade when using the jQueryTools tooltips. It was with the downloaded version. I plugged into their CDN version as a sanity check, and the fades started working properly.
To get the most recent CDN link, visit the download page and look for the Quick Start section