mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Merge branch 'attrhooks.1.6v2' of https://github.com/timmywil/jquery
This commit is contained in:
commit
92dfb53314
@ -23,20 +23,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)
|
||||
|
@ -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)
|
||||
|
@ -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." );
|
||||
|
Loading…
Reference in New Issue
Block a user