Commit 00abeaee authored by timmywil's avatar timmywil

Didn't actually need the hooks anymore

parent 4baa213d
...@@ -275,6 +275,8 @@ jQuery.extend({ ...@@ -275,6 +275,8 @@ jQuery.extend({
offset: true offset: true
}, },
attrFix: {},
attr: function( elem, name, value, pass ) { attr: function( elem, name, value, pass ) {
// don't get/set attributes on text, comment and attribute nodes // don't get/set attributes on text, comment and attribute nodes
...@@ -290,6 +292,9 @@ jQuery.extend({ ...@@ -290,6 +292,9 @@ jQuery.extend({
notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ), notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ),
hooks; hooks;
// Normalize the name if needed
name = notxml && jQuery.attrFix[ name ] || name;
hooks = jQuery.attrHooks[ name ]; hooks = jQuery.attrHooks[ name ];
if ( value !== undefined ) { if ( value !== undefined ) {
...@@ -472,7 +477,7 @@ if ( !jQuery.support.optSelected ) { ...@@ -472,7 +477,7 @@ if ( !jQuery.support.optSelected ) {
// IE6/7 do not support getting/setting some attributes with get/setAttribute // IE6/7 do not support getting/setting some attributes with get/setAttribute
if ( jQuery.support.attrFix ) { if ( jQuery.support.attrFix ) {
var attrFix = { jQuery.extend(jQuery.attrFix, {
"for": "htmlFor", "for": "htmlFor",
"class": "className", "class": "className",
readonly: "readOnly", readonly: "readOnly",
...@@ -483,17 +488,5 @@ if ( jQuery.support.attrFix ) { ...@@ -483,17 +488,5 @@ if ( jQuery.support.attrFix ) {
tabindex: "tabIndex", tabindex: "tabIndex",
usemap: "useMap", usemap: "useMap",
frameborder: "frameBorder" frameborder: "frameBorder"
};
jQuery.each(attrFix, function( key, name ) {
jQuery.attrHooks[ key ] = jQuery.extend( jQuery.attrHooks[ key ], {
get: function( elem ) {
return elem.getAttribute( name );
},
set: function( elem, value ) {
elem.setAttribute( name, value );
return value;
}
});
}); });
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment