.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).
精彩评论