X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Feffects.js;h=f9c682c9f4e5f5dd0937806228ab93c25e59e293;hb=118c8c4600b62d6de2b0248ae27626da74dcf5b2;hp=51ce0c5772c54dcf6a1e94fc657c917ccbbf06c3;hpb=fb48ae8e6cca25fd29ef2b1eb23e9efa7b0eef7c;p=jquery.git diff --git a/src/effects.js b/src/effects.js index 51ce0c5..f9c682c 100644 --- a/src/effects.js +++ b/src/effects.js @@ -60,11 +60,12 @@ jQuery.fn.extend({ } else { for ( var i = 0, j = this.length; i < j; i++ ) { - var display = jQuery.css( this[i], "display" ); - - if ( display !== "none" ) { - jQuery.data( this[i], "olddisplay", display ); - } + var display = jQuery.css( this[i], "display" ), + old = jQuery.data( this[i], "olddisplay" ); + + if ( !old && display !== "none" ) { + jQuery.data( this[i], "olddisplay", display ); + } } // Set the display of the elements in a second loop