]> source.dussan.org Git - jquery.git/commitdiff
Added back support.js test for getSetAttribute and removed some duplicate code that... 311/head
authortimmywil <tim.willison@thisismedium.com>
Sun, 10 Apr 2011 21:08:18 +0000 (17:08 -0400)
committertimmywil <tim.willison@thisismedium.com>
Sun, 10 Apr 2011 21:08:18 +0000 (17:08 -0400)
src/attributes.js
src/support.js

index f7c2e981871b86901c16bd998d95c67eacafd36d..eca7f34781f2a33e5331aead15062a88581b40ed 100644 (file)
@@ -24,20 +24,6 @@ jQuery.fn.extend({
                return jQuery.access( this, name, value, true, jQuery.prop );
        },
        
-       removeProp: function( name ) {
-               return this.each(function() {
-                       // try/catch handles cases where IE balks (such as removing a property on window)
-                       try {
-                               this[ name ] = undefined;
-                               delete this[ name ];
-                       } catch( e ) {}
-               });
-       },
-       
-       prop: function( name, value ) {
-               return jQuery.access( this, name, value, true, jQuery.prop );
-       },
-       
        removeProp: function( name ) {
                return this.each(function() {
                        // try/catch handles cases where IE balks (such as removing a property on window)
index 10696aabdd90579a8d7f73a2154e7009918d9444..a919e4c7c872fb8329437f8f5d7fba4baede2c25 100644 (file)
@@ -19,7 +19,8 @@ jQuery.support = (function() {
                isSupported;
 
        // Preliminary tests
-       div.innerHTML = "   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+       div.setAttribute("className", "t");
+       div.innerHTML = "   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
 
        all = div.getElementsByTagName( "*" );
        a = div.getElementsByTagName( "a" )[ 0 ];
@@ -48,7 +49,7 @@ jQuery.support = (function() {
 
                // Get the style information from getAttribute
                // (IE uses .cssText instead)
-               style: /red/.test( a.getAttribute("style") ),
+               style: /top/.test( a.getAttribute("style") ),
 
                // Make sure that URLs aren't manipulated
                // (IE normalizes it by default)