Monday, January 23, 2012

IE flicker when using jQuery slide animation

Everytime that I have tried to use the jQuery slide animation in IE I have been put off by the flicker that occurs when the animation completes. In order to get around this, try the following code in the document ready function:

// Define overriding method.
jQuery.fx.prototype.hide = function(){

// Remember where we started, so that we can go back to it later
this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
this.options.hide = true;

// Begin the animation
this.custom(this.cur(), 1);
}

No comments:

Post a Comment