Adding a tweak to prevent layout breaks in the boxModel check on IE 6. Fixes bug...
authorJohn Resig <jeresig@gmail.com>
Sat, 7 Feb 2009 17:15:01 +0000 (17:15 +0000)
committerJohn Resig <jeresig@gmail.com>
Sat, 7 Feb 2009 17:15:01 +0000 (17:15 +0000)
src/support.js

index 6139395..b11f847 100644 (file)
        // 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';
        });
 })();