aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortimmywil <tim.willison@thisismedium.com>2011-04-19 13:17:38 -0400
committertimmywil <tim.willison@thisismedium.com>2011-04-19 13:17:38 -0400
commit825d3d96cebf9a88f34411a2df95622fd3e32619 (patch)
treed18c9ef9b1d0e8a551457a9ccd3e7774bba81a74 /src
parent3a3842c6696f121392c89b68f2f061043405ae9f (diff)
downloadjquery-825d3d96cebf9a88f34411a2df95622fd3e32619.tar.gz
jquery-825d3d96cebf9a88f34411a2df95622fd3e32619.zip
Only use getAttributeNode on buttons when setting value
Diffstat (limited to 'src')
-rw-r--r--src/attributes.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/attributes.js b/src/attributes.js
index 794b98d75..d163469c7 100644
--- a/src/attributes.js
+++ b/src/attributes.js
@@ -435,6 +435,9 @@ if ( !jQuery.support.getSetAttribute ) {
// And the name attribute
formHook = jQuery.attrHooks.name = jQuery.attrHooks.value = jQuery.valHooks.button = {
get: function( elem, name ) {
+ if ( name === "value" && !jQuery.nodeName( elem, "button" ) ) {
+ return elem.getAttribute( name );
+ }
var ret = elem.getAttributeNode( name );
// Return undefined if not specified instead of empty string
return ret && ret.specified ?