git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3386923
)
Fixed bug with $.attr(), it was attempting to set attribute even if you're attempting...
author
John Resig
<jeresig@gmail.com>
Wed, 17 May 2006 18:46:51 +0000
(18:46 +0000)
committer
John Resig
<jeresig@gmail.com>
Wed, 17 May 2006 18:46:51 +0000
(18:46 +0000)
jquery/jquery.js
patch
|
blob
|
history
diff --git
a/jquery/jquery.js
b/jquery/jquery.js
index
179cd29
..
4592c1b
100644
(file)
--- a/
jquery/jquery.js
+++ b/
jquery/jquery.js
@@
-573,7
+573,7
@@
$.attr = function(o,a,v){
a = (fix[a] && fix[a].replace && fix[a]) || a;
var r = new RegExp("-([a-z])","ig");
a = a.replace(r,function(z,b){return b.toUpperCase();});
- if ( v !== null ) {
+ if ( typeof v != 'undefined' ) {
o[a] = v;
if ( o.setAttribute ) {
o.setAttribute(a,v);