Skip to content
Permalink
Browse files

Move the check for the name attribute out of attr and down to the for…

…mHook definition
  • Loading branch information
timmywil
timmywil committed Mar 30, 2011
1 parent fa4373c commit 1e9b3ef3d87a0934dec969ed469cd3cc9c910ae8
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/attributes.js
@@ -301,7 +301,7 @@ jQuery.extend({

// Get the appropriate hook, or the formHook
// if getSetAttribute is not supported and we have form objects in IE6/7
hooks = jQuery.attrHooks[ name ] || ( ( name === "name" || elem.nodeName === "FORM" ) && formHook );
hooks = jQuery.attrHooks[ name ] || ( elem.nodeName === "FORM" && formHook );

if ( value !== undefined ) {

@@ -426,7 +426,7 @@ if ( !jQuery.support.getSetAttribute ) {

// Use this for any attribute on a form in IE6/7
// And the name attribute
formHook = {
formHook = jQuery.attrHooks.name = {
get: function( elem, name ) {
var ret = elem.getAttributeNode( name );
// Return undefined if not specified instead of empty string

0 comments on commit 1e9b3ef

Please sign in to comment.
You can’t perform that action at this time.