| @@ 8234-8278 (lines=45) @@ | ||
| 8231 | fxNow; |
|
| 8232 | ||
| 8233 | jQuery.fn.extend({ |
|
| 8234 | show: function( speed, easing, callback ) { |
|
| 8235 | var elem, display; |
|
| 8236 | ||
| 8237 | if ( speed || speed === 0 ) { |
|
| 8238 | return this.animate( genFx("show", 3), speed, easing, callback ); |
|
| 8239 | ||
| 8240 | } else { |
|
| 8241 | for ( var i = 0, j = this.length; i < j; i++ ) { |
|
| 8242 | elem = this[ i ]; |
|
| 8243 | ||
| 8244 | if ( elem.style ) { |
|
| 8245 | display = elem.style.display; |
|
| 8246 | ||
| 8247 | // Reset the inline display of this element to learn if it is |
|
| 8248 | // being hidden by cascaded rules or not |
|
| 8249 | if ( !jQuery._data(elem, "olddisplay") && display === "none" ) { |
|
| 8250 | display = elem.style.display = ""; |
|
| 8251 | } |
|
| 8252 | ||
| 8253 | // Set elements which have been overridden with display: none |
|
| 8254 | // in a stylesheet to whatever the default browser style is |
|
| 8255 | // for such an element |
|
| 8256 | if ( display === "" && jQuery.css(elem, "display") === "none" ) { |
|
| 8257 | jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) ); |
|
| 8258 | } |
|
| 8259 | } |
|
| 8260 | } |
|
| 8261 | ||
| 8262 | // Set the display of most of the elements in a second loop |
|
| 8263 | // to avoid the constant reflow |
|
| 8264 | for ( i = 0; i < j; i++ ) { |
|
| 8265 | elem = this[ i ]; |
|
| 8266 | ||
| 8267 | if ( elem.style ) { |
|
| 8268 | display = elem.style.display; |
|
| 8269 | ||
| 8270 | if ( display === "" || display === "none" ) { |
|
| 8271 | elem.style.display = jQuery._data( elem, "olddisplay" ) || ""; |
|
| 8272 | } |
|
| 8273 | } |
|
| 8274 | } |
|
| 8275 | ||
| 8276 | return this; |
|
| 8277 | } |
|
| 8278 | }, |
|
| 8279 | ||
| 8280 | hide: function( speed, easing, callback ) { |
|
| 8281 | if ( speed || speed === 0 ) { |
|
| @@ 7296-7334 (lines=39) @@ | ||
| 7293 | ]; |
|
| 7294 | ||
| 7295 | jQuery.fn.extend({ |
|
| 7296 | show: function( speed, easing, callback ) { |
|
| 7297 | var elem, display; |
|
| 7298 | ||
| 7299 | if ( speed || speed === 0 ) { |
|
| 7300 | return this.animate( genFx("show", 3), speed, easing, callback); |
|
| 7301 | ||
| 7302 | } else { |
|
| 7303 | for ( var i = 0, j = this.length; i < j; i++ ) { |
|
| 7304 | elem = this[i]; |
|
| 7305 | display = elem.style.display; |
|
| 7306 | ||
| 7307 | // Reset the inline display of this element to learn if it is |
|
| 7308 | // being hidden by cascaded rules or not |
|
| 7309 | if ( !jQuery._data(elem, "olddisplay") && display === "none" ) { |
|
| 7310 | display = elem.style.display = ""; |
|
| 7311 | } |
|
| 7312 | ||
| 7313 | // Set elements which have been overridden with display: none |
|
| 7314 | // in a stylesheet to whatever the default browser style is |
|
| 7315 | // for such an element |
|
| 7316 | if ( display === "" && jQuery.css( elem, "display" ) === "none" ) { |
|
| 7317 | jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName)); |
|
| 7318 | } |
|
| 7319 | } |
|
| 7320 | ||
| 7321 | // Set the display of most of the elements in a second loop |
|
| 7322 | // to avoid the constant reflow |
|
| 7323 | for ( i = 0; i < j; i++ ) { |
|
| 7324 | elem = this[i]; |
|
| 7325 | display = elem.style.display; |
|
| 7326 | ||
| 7327 | if ( display === "" || display === "none" ) { |
|
| 7328 | elem.style.display = jQuery._data(elem, "olddisplay") || ""; |
|
| 7329 | } |
|
| 7330 | } |
|
| 7331 | ||
| 7332 | return this; |
|
| 7333 | } |
|
| 7334 | }, |
|
| 7335 | ||
| 7336 | hide: function( speed, easing, callback ) { |
|
| 7337 | if ( speed || speed === 0 ) { |
|