1

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);
        }
4

1 回答 1

3

学习调试!

所以这意味着scrollapi未定义。看看它是在哪里定义的。

var scrollapi = $(".scrollable").data('scrollable');
console.log($(".scrollable").length);  // Says it is Zero...sooo hence your problem
console.log($(".scrollable").data('scrollable'));  //undefined

那么问题是什么?当此代码运行时,页面上没有具有 class 的元素.scrollable

于 2013-06-05T17:46:37.020 回答