MCPcopy Index your code
hub / github.com/JsAaron/jQuery / defaultDisplay

Function defaultDisplay

2.1.1/test/other.js:2888–2917  ·  view source on GitHub ↗

* Try to determine the default display value of an element * @param {String} nodeName

( nodeName )

Source from the content-addressed store, hash-verified

2886 * @param {String} nodeName
2887 */
2888function defaultDisplay( nodeName ) {
2889 var doc = document,
2890 display = elemdisplay[ nodeName ];
2891
2892 if ( !display ) {
2893 display = actualDisplay( nodeName, doc );
2894
2895 // If the simple way fails, read from inside an iframe
2896 if ( display === "none" || !display ) {
2897
2898 // Use the already-created iframe if possible
2899 iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
2900
2901 // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
2902 doc = iframe[ 0 ].contentDocument;
2903
2904 // Support: IE
2905 doc.write();
2906 doc.close();
2907
2908 display = actualDisplay( nodeName, doc );
2909 iframe.detach();
2910 }
2911
2912 // Store the correct default display
2913 elemdisplay[ nodeName ] = display;
2914 }
2915
2916 return display;
2917}
2918var rmargin = (/^margin/);
2919
2920var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );

Callers 2

showHideFunction · 0.70
defaultPrefilterFunction · 0.70

Calls 2

actualDisplayFunction · 0.70
jQueryFunction · 0.70

Tested by

no test coverage detected