Hello i have this script working fine here.. know it has no syntax errors or else.
The problem is when i try to implement it here..
I have tried to unset the jquery.min.js cause thats the only file i see that my cause conflict, not twitter or facebook js, and just for test i just test it and I always get
Cannot call method 'begin' of undefined
Heres the link so you can check it
http://queretaro.orsilin.com.mx/index.php?page=item/view/15/Probando
this is the part causing conflict
if (nextImageIndex === 0) {
scrollapi.begin(200);
} else if ( nextImageIndex % 4 === 0 && nextImageIndex > 0) {
scrollapi.next(200);
}
Learn to debug!
So that means scrollapi
is undefined. look where it is defined.
var scrollapi = $(".scrollable").data('scrollable');
console.log($(".scrollable").length); // Says it is Zero...sooo hence your problem
console.log($(".scrollable").data('scrollable')); //undefined
So what is the problem? You have no element on the page when this code runs that has the class .scrollable
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.