开发者

.call() is not a function

I have made a CSS3 animation plugin for jquery that works perfectly in JS Fiddle: http://jsfiddle.net/backflip/BqFsM/

but when i use it in my context i get "TypeError: Result of expression '$fnStop.call' [undefined] is not a function."

here is my code: http://meodai.ch/alainbenoit/

but i can't figure out why. Any idea?

This is how i overwrite开发者_开发百科 the jquery native Stop function:

if (Modernizr.csstransitions) {
    $fnStop = $.fn.stop();
    $.fn.stop = function(clearQueue, jumpToEnd) {
        if (this.data("css3animate")) {
            return methods.stop.apply(this, arguments);
        } else {
            return $fnStop.call(this, arguments);
        }
    };
}


$fnStop = $.fn.stop();

Should probably be:

$fnStop = $.fn.stop;

You probably want to point to it, not trigger it (and save its result).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜