From: timmywil Date: Tue, 19 Apr 2011 17:45:01 +0000 (-0400) Subject: Fix test suite fails for hiding text nodes in F4 and IE9. Update for #6135. X-Git-Tag: 1.6rc1~11^2~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8d2d94cfbab40d3919b4d5e596e589a2be09af1a;p=jquery.git Fix test suite fails for hiding text nodes in F4 and IE9. Update for #6135. --- diff --git a/src/effects.js b/src/effects.js index d002d6d11..832ef5da0 100644 --- a/src/effects.js +++ b/src/effects.js @@ -71,10 +71,12 @@ jQuery.fn.extend({ } else { for ( var i = 0, j = this.length; i < j; i++ ) { - var display = jQuery.css( this[i], "display" ); + if ( this[i].style ) { + var display = jQuery.css( this[i], "display" ); - if ( display !== "none" && !jQuery._data( this[i], "olddisplay" ) ) { - jQuery._data( this[i], "olddisplay", display ); + if ( display !== "none" && !jQuery._data( this[i], "olddisplay" ) ) { + jQuery._data( this[i], "olddisplay", display ); + } } }