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

Function actualDisplay

2.1.1/test/other.js:2866–2882  ·  view source on GitHub ↗
( name, doc )

Source from the content-addressed store, hash-verified

2864 */
2865// Called only from within defaultDisplay
2866function actualDisplay( name, doc ) {
2867 var style,
2868 elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
2869
2870 // getDefaultComputedStyle might be reliably used only on attached element
2871 display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
2872
2873 // Use of this method is a temporary fix (more like optmization) until something better comes along,
2874 // since it was removed from specification and supported only in FF
2875 style.display : jQuery.css( elem[ 0 ], "display" );
2876
2877 // We don't have any data stored on the element,
2878 // so use "detach" method as fast way to get rid of the element
2879 elem.detach();
2880
2881 return display;
2882}
2883
2884/**
2885 * Try to determine the default display value of an element

Callers 1

defaultDisplayFunction · 0.70

Calls 1

jQueryFunction · 0.70

Tested by

no test coverage detected