Closed ghost closed 10 years ago
I can confirm this issue. It happens to me too, but only with webkit browsers (Chrome & Opera). With Firefox / IE11 everything works fine.
Here's my configuration: http://jsfiddle.net/uzzuw/ It seems that on jsfiddle everything works just fine with all browsers, but on local (with same configuration) it simply doesn't. Where's the problem?
After control+f5, as @jasaroc said, everything comes back to normal, but on page refresh the issue is back. When this happens, I noticed that Opera browser's console outputs this specific error:
Uncaught TypeError: Cannot call method 'index' of null jquery.jcarousel.min.js:847
$.jCarousel.plugin._prepare jquery.jcarousel.js:847
$.jCarousel.plugin._reload jquery.jcarousel.js:344
$.jCarousel.plugin._create jquery.jcarousel.js:289
create jquery.jcarousel.js:79
$.(anonymous function) jquery.jcarousel.js:175
(anonymous function) jquery.jcarousel.js:219
b.extend.each jquery.js:3
b.fn.b.each jquery.js:3
$.fn.(anonymous function) jquery.jcarousel.js:213
(anonymous function) common.js:39
c jquery.js:3
p.fireWith jquery.js:3
b.extend.ready jquery.js:3
H
\ Probably on jsfiddle works fine because everytime you run the code it's something like ctrl+f5.
When I link the script to @jsor website (http://sorgalla.com/jcarousel/dist/jquery.jcarousel.min.js) the issue is fixed, but when I switch back to local file it happens again. Even if I set my script src to absolute path nothing changes..
\ That's why the jsfiddle eg works!
After inspecting jsfiddle page & my own, I noticed something was missing in my script. So when you begin writing the script configuration, MAKE SURE you wrap it inside the following:
$(window).load(function(){
$(document).ready(function(){
//your jCarousel configuration
});
});
What I was missing was the (window).load function.
hum i not noticed that i will fix and try tankyou very mutch
2014-03-07 6:26 GMT-03:00 Jan Sorgalla notifications@github.com:
Closed #641 https://github.com/jsor/jcarousel/issues/641.
Reply to this email directly or view it on GitHubhttps://github.com/jsor/jcarousel/issues/641 .
http://www.avalanchecriattiva.com.br
Contato: email: jasaroc@gmail.com msn: suporte@targetzdigital.com Cel: (11) 986435771 ( TIM )
every time that i access the page the itens nunbers are wrong and i need to reload the page to fix it, every time that i reload using control + f5 the problem appears agaim