From: timmywil Date: Sun, 10 Apr 2011 21:08:18 +0000 (-0400) Subject: Added back support.js test for getSetAttribute and removed some duplicate code that... X-Git-Tag: 1.6b1~27^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=215c507f796db16a6e9230a2ecc27c57a1b85280;p=jquery.git Added back support.js test for getSetAttribute and removed some duplicate code that crept into attributes.js --- diff --git a/src/attributes.js b/src/attributes.js index f7c2e9818..eca7f3478 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -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) diff --git a/src/support.js b/src/support.js index 10696aabd..a919e4c7c 100644 --- a/src/support.js +++ b/src/support.js @@ -19,7 +19,8 @@ jQuery.support = (function() { isSupported; // Preliminary tests - div.innerHTML = "
a"; + div.setAttribute("className", "t"); + div.innerHTML = "
a"; 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)