diff options
author | jeresig <jeresig@gmail.com> | 2011-04-10 17:11:35 -0400 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2011-04-10 17:11:35 -0400 |
commit | 92dfb53314b4654826940eec3dc98aede92d4d49 (patch) | |
tree | e3fd015ba20d236c3592672e7839fa2df3424f0e | |
parent | f89edbc6e4bd79aa1455e7b3a2e4767ce4371027 (diff) | |
parent | 215c507f796db16a6e9230a2ecc27c57a1b85280 (diff) | |
download | jquery-92dfb53314b4654826940eec3dc98aede92d4d49.tar.gz jquery-92dfb53314b4654826940eec3dc98aede92d4d49.zip |
Merge branch 'attrhooks.1.6v2' of https://github.com/timmywil/jquery
-rw-r--r-- | src/attributes.js | 14 | ||||
-rw-r--r-- | src/support.js | 5 | ||||
-rw-r--r-- | test/unit/attributes.js | 4 |
3 files changed, 3 insertions, 20 deletions
diff --git a/src/attributes.js b/src/attributes.js index 7868e08ed..c34cd6193 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -32,20 +32,6 @@ jQuery.fn.extend({ } 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) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, addClass: function( value ) { if ( jQuery.isFunction( value ) ) { diff --git a/src/support.js b/src/support.js index 2d7bc7caa..34960505a 100644 --- a/src/support.js +++ b/src/support.js @@ -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) diff --git a/test/unit/attributes.js b/test/unit/attributes.js index fa30ff042..f3f0bab2b 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -127,10 +127,6 @@ test("attr(String)", function() { body.removeAttribute('foo'); // Cleanup - var select = document.createElement("select"), optgroup = document.createElement("optgroup"), option = document.createElement("option"); - optgroup.appendChild( option ); - select.appendChild( optgroup ); - var $img = jQuery('<img style="display:none" width="215" height="53" src="http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif"/>').appendTo('body'); equals( $img.attr('width'), "215", "Retrieve width attribute an an element with display:none." ); equals( $img.attr('height'), "53", "Retrieve height attribute an an element with display:none." ); |