From 31597b7b3ce7737ead61eec55d9f66b9e9836cf7 Mon Sep 17 00:00:00 2001 From: John Resig Date: Sat, 7 Feb 2009 17:15:01 +0000 Subject: [PATCH] Adding a tweak to prevent layout breaks in the boxModel check on IE 6. Fixes bug #4014. --- src/support.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/support.js b/src/support.js index 6139395df..b11f84794 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'; }); })();