a";
var all = div.getElementsByTagName("*"),
- a = div.getElementsByTagName("a")[0];
+ a = div.getElementsByTagName("a")[0],
+ select = document.createElement("select"),
+ opt = select.appendChild( document.createElement("option") );
// Can't get basic test support
if ( !all || !all.length || !a ) {
return;
}
- var select = document.createElement("select");
- var opt = select.appendChild( document.createElement("option") );
-
jQuery.support = {
// IE strips leading whitespace when .innerHTML is used
leadingWhitespace: div.firstChild.nodeType === 3,
@@ -66,7 +65,9 @@
checkClone: false,
scriptEval: false,
noCloneEvent: true,
- boxModel: null
+ boxModel: null,
+ inlineBlockNeedsLayout: false,
+ reliableHiddenOffsets: true
};
// Make sure that the options inside disabled selects aren't marked as disabled
@@ -118,6 +119,29 @@
document.body.appendChild( div );
jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
+
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline'
+ // (IE < 8 does this)
+ if ( 'zoom' in div.style ) {
+ div.style.display = 'inline';
+
+ // Layout is necessary to trigger this âfeatureâ
+ div.style.zoom = 1;
+ jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2;
+ }
+
+ // Check if table cells still have offsetWidth/Height when they are set
+ // to display:none and there are still other visible table cells in a
+ // table row; if so, offsetWidth/Height are not reliable for use when
+ // determining if an element has been hidden directly using
+ // display:none (it is still safe to use offsets if a parent element is
+ // hidden; don safety goggles and see bug #4512 for more information).
+ // (only IE 8 fails this test)
+ div.innerHTML = '