From: John Resig Date: Sat, 7 Feb 2009 17:15:01 +0000 (+0000) Subject: Adding a tweak to prevent layout breaks in the boxModel check on IE 6. Fixes bug... X-Git-Url: http://git.asbjorn.it/?p=jquery.git;a=commitdiff_plain;h=31597b7b3ce7737ead61eec55d9f66b9e9836cf7 Adding a tweak to prevent layout breaks in the boxModel check on IE 6. Fixes bug #4014. --- diff --git a/src/support.js b/src/support.js index 6139395..b11f847 100644 --- a/src/support.js +++ b/src/support.js @@ -88,12 +88,11 @@ // document.body must exist before we can do this jQuery(function(){ var div = document.createElement("div"); - div.style.width = "1px"; - div.style.paddingLeft = "1px"; + div.style.width = div.style.paddingLeft = "1px"; document.body.appendChild( div ); jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2; - document.body.removeChild( div ); + document.body.removeChild( div ).style.display = 'none'; }); })();