Ticket #1284 (closed bug: worksforme)
FF: animate() don't work
| Reported by: | adrian_wrobel | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.1.4 |
| Component: | effects | Version: | 1.1.3 |
| Keywords: | animate | Cc: | |
| Blocking: | Blocked by: |
Description
The animation don't work again if something was already shown or hidden in Firefox (2.0.4).
the fix for this is to change animation part in fx.js like this:
animate: function( prop, speed, easing, callback ) {
var hidden = jQuery(this).is(":hidden"); for ( var p in prop ) {
if ( prop[p] == "hide" && hidden prop[p] == "show" && !hidden ) return; };
return this.queue(function(){
this.curAnim = jQuery.extend({}, prop); var opt = jQuery.speed(speed, easing, callback); var self = this;
jQuery.each( prop, function(name, val){
var e = new jQuery.fx( self, opt, name ); if ( val.constructor == Number )
e.custom( e.cur(), val );
else
e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
});
});
},
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

This was resolved in jQuery 1.1.3.