문제

Hello i have this script working fine here.. know it has no syntax errors or else.

http://jsfiddle.net/xHL35/9/

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top