aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes.js
diff options
context:
space:
mode:
authortimmywil <tim.willison@thisismedium.com>2011-04-01 21:38:54 -0400
committertimmywil <tim.willison@thisismedium.com>2011-04-03 19:13:41 -0400
commit8cbf551a48cbc47eccba2050e95745f70166ae1d (patch)
tree47daf679eda1210c67dbcd7f7b543950d0197569 /src/attributes.js
parent5fc2281fcc83783b86647a5a86380b9ac21e7f79 (diff)
downloadjquery-8cbf551a48cbc47eccba2050e95745f70166ae1d.tar.gz
jquery-8cbf551a48cbc47eccba2050e95745f70166ae1d.zip
#5413 - Much shorter solution for getting width/height in ie6
- #8255 Added support for the list attribute in browsers that support it (it is automatically readonly, but can be set if using getAttribute( name, 2)
Diffstat (limited to 'src/attributes.js')
-rw-r--r--src/attributes.js16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/attributes.js b/src/attributes.js
index f29c340a3..5afcffce3 100644
--- a/src/attributes.js
+++ b/src/attributes.js
@@ -446,20 +446,6 @@ if ( !jQuery.support.getSetAttribute ) {
return value;
}
};
-
- // Retrieving the width/height attributes on an
- // element with display: none returns 0 in ie6/7 (#5413)
- jQuery.each([ "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- get: function( elem ) {
- var ret;
- jQuery.swap( elem, { visibility: "hidden", display: "block" }, function() {
- ret = elem.getAttribute( name );
- });
- return ret;
- }
- });
- });
}
// Remove certain attrs if set to false
@@ -481,7 +467,7 @@ jQuery.each([ "selected", "checked", "readonly", "disabled" ], function( i, name
// Some attributes require a special call on IE
if ( !jQuery.support.hrefNormalized ) {
- jQuery.each([ "href", "src", "style" ], function( i, name ) {
+ jQuery.each([ "href", "src", "style", "width", "height", "list" ], function( i, name ) {
jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
get: function( elem ) {
return elem.getAttribute( name, 2 );