开发者

.call() is not a function

开发者 https://www.devze.com 2023-02-19 20:59 出处:网络
I have made a CSS3 animation plugin for jquery that works perfectly in JS Fiddle: http://jsfiddle.net/backflip/BqFsM/

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

精彩评论

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