git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Disabled the passthrough .attr(method_name) functionality. You can now use it if...
[jquery.git]
/
src
/
attributes.js
diff --git
a/src/attributes.js
b/src/attributes.js
index
90f3062
..
e7e5d37
100644
(file)
--- a/
src/attributes.js
+++ b/
src/attributes.js
@@
-232,13
+232,13
@@
jQuery.extend({
offset: true
},
offset: true
},
- attr: function( elem, name, value ) {
+ attr: function( elem, name, value, pass ) {
// don't set attributes on text and comment nodes
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
return undefined;
}
// don't set attributes on text and comment nodes
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
return undefined;
}
- if ( name in jQuery.attrFn && value !== undefined ) {
+ if ( pass && name in jQuery.attrFn ) {
return jQuery(elem)[name](value);
}
return jQuery(elem)[name](value);
}