From: timmywil Date: Sat, 9 Apr 2011 19:56:35 +0000 (-0400) Subject: IE8 testing for lowercasing the css properties on retrieving style; had assumed the... X-Git-Tag: 1.6b1~27^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=17afd80d485b4ca36145a40fd7ac8f81f7099f7c;p=jquery.git IE8 testing for lowercasing the css properties on retrieving style; had assumed the style support check failed in IE8, which it now does --- diff --git a/src/support.js b/src/support.js index b227293d8..89d2bfea2 100644 --- a/src/support.js +++ b/src/support.js @@ -8,7 +8,7 @@ div.style.display = "none"; div.setAttribute("className", "t"); - div.innerHTML = "
a"; + div.innerHTML = "
a"; var all = div.getElementsByTagName("*"), a = div.getElementsByTagName("a")[0], @@ -34,8 +34,8 @@ htmlSerialize: !!div.getElementsByTagName("link").length, // Get the style information from getAttribute - // (IE uses .cssText insted) - style: /red/.test( a.getAttribute("style") ), + // (IE uses .cssText instead, and capitalizes all property names) + style: /top/.test( a.getAttribute("style") ), // Make sure that URLs aren't manipulated // (IE normalizes it by default) diff --git a/test/unit/attributes.js b/test/unit/attributes.js index 4289bc3b7..3611b03eb 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -110,8 +110,8 @@ test("attr(String)", function() { equals( jQuery('#tAnchor5').attr('href'), "#5", 'Check for non-absolute href (an anchor)' ); // list attribute is readonly by default in browsers that support it - jQuery("#list-test").attr("list", "datalist"); - equals( jQuery("#list-test").attr("list"), "datalist", "Check setting list attribute" ); + jQuery('#list-test').attr('list', 'datalist'); + equals( jQuery('#list-test').attr('list'), 'datalist', 'Check setting list attribute' ); // Related to [5574] and [5683] var body = document.body, $body = jQuery(body);