diff options
author | rwldrn <waldron.rick@gmail.com> | 2011-04-13 13:58:17 -0400 |
---|---|---|
committer | rwldrn <waldron.rick@gmail.com> | 2011-04-13 13:58:17 -0400 |
commit | 59240d31c0c277a60fdc187e0fc9884007971106 (patch) | |
tree | e7e387dd17cfebd2fa9481f79053866d6794a9a6 /src | |
parent | 4fde550cb62219d7edd14653888608fbbf39c22a (diff) | |
download | jquery-59240d31c0c277a60fdc187e0fc9884007971106.tar.gz jquery-59240d31c0c277a60fdc187e0fc9884007971106.zip |
Ticket #8099 Updates per review
Diffstat (limited to 'src')
-rw-r--r-- | src/effects.js | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/effects.js b/src/effects.js index 828798cb5..460811cd9 100644 --- a/src/effects.js +++ b/src/effects.js @@ -1,6 +1,8 @@ (function( jQuery ) { var elemdisplay = {}, + iframe = null, + iframeDoc = null, rfxtypes = /^(?:toggle|show|hide)$/, rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i, timerId, @@ -558,11 +560,8 @@ function defaultDisplay( nodeName ) { if ( display === "none" || display === "" ) { - var iframe = defaultDisplay.iframe, - iframeDoc = defaultDisplay.iframeDoc; - // No iframe to use yet, so create it - if ( !defaultDisplay.iframe ) { + if ( !iframe ) { iframe = document.createElement( "iframe" ); iframe.width = iframe.height = 0; @@ -572,9 +571,6 @@ function defaultDisplay( nodeName ) { iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; iframeDoc.write("<!doctype><html><body></body></html>"); - // Cache iframe element - defaultDisplay.iframe = iframe; - defaultDisplay.iframeDoc = iframeDoc; } else { // Reuse previous iframe @@ -598,9 +594,6 @@ function defaultDisplay( nodeName ) { return elemdisplay[ nodeName ]; } -defaultDisplay.iframe = null; -defaultDisplay.iframeDoc = null; - })( jQuery ); |