fix for #4204, fadeTo shows hidden elements before animating

This commit is contained in:
Brandon Aaron 2009-03-18 14:58:06 +00:00
parent ace13387c8
commit 62a251a0cf

View File

@ -95,7 +95,8 @@ jQuery.fn.extend({
}, },
fadeTo: function(speed,to,callback){ fadeTo: function(speed,to,callback){
return this.animate({opacity: to}, speed, callback); return this.filter(":hidden").css('opacity', 0).show().end()
.animate({opacity: to}, speed, callback);
}, },
animate: function( prop, speed, easing, callback ) { animate: function( prop, speed, easing, callback ) {