Fix #12026. Let props in $(html, props) be any jQuery.fn method.

Closes gh-839.
This commit is contained in:
Dave Methvin
2012-07-05 17:21:58 -04:00
parent 1e027610d6
commit cdd5132dcc
2 changed files with 13 additions and 16 deletions

View File

@@ -281,17 +281,6 @@ jQuery.extend({
}
},
attrFn: {
val: true,
css: true,
html: true,
text: true,
data: true,
width: true,
height: true,
offset: true
},
attr: function( elem, name, value, pass ) {
var ret, hooks, notxml,
nType = elem.nodeType;
@@ -301,7 +290,7 @@ jQuery.extend({
return;
}
if ( pass && name in jQuery.attrFn ) {
if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) {
return jQuery( elem )[ name ]( value );
}