]> source.dussan.org Git - jquery.git/commitdiff
IE8 testing for lowercasing the css properties on retrieving style; had assumed the...
authortimmywil <tim.willison@thisismedium.com>
Sat, 9 Apr 2011 19:56:35 +0000 (15:56 -0400)
committertimmywil <tim.willison@thisismedium.com>
Sat, 9 Apr 2011 19:56:35 +0000 (15:56 -0400)
src/support.js
test/unit/attributes.js

index b227293d8931fd9cb6f4e22847ae499c863be81b..89d2bfea27cfe5e7356e1fc0200369dcb46fc48a 100644 (file)
@@ -8,7 +8,7 @@
 
        div.style.display = "none";
        div.setAttribute("className", "t");
-       div.innerHTML = "   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+       div.innerHTML = "   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
        
        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)
index 4289bc3b7ed04823839b4c9c1ed1ffb17db72769..3611b03eb752458b2370e9a68e1d986a78804f84 100644 (file)
@@ -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);