Fixed bug with $.attr(), it was attempting to set attribute even if you're attempting to access a value. This was due to the !== null fix.
This commit is contained in:
parent
3386923dcc
commit
c75701a015
2
jquery/jquery.js
vendored
2
jquery/jquery.js
vendored
|
@ -573,7 +573,7 @@ $.attr = function(o,a,v){
|
||||||
a = (fix[a] && fix[a].replace && fix[a]) || a;
|
a = (fix[a] && fix[a].replace && fix[a]) || a;
|
||||||
var r = new RegExp("-([a-z])","ig");
|
var r = new RegExp("-([a-z])","ig");
|
||||||
a = a.replace(r,function(z,b){return b.toUpperCase();});
|
a = a.replace(r,function(z,b){return b.toUpperCase();});
|
||||||
if ( v !== null ) {
|
if ( typeof v != 'undefined' ) {
|
||||||
o[a] = v;
|
o[a] = v;
|
||||||
if ( o.setAttribute ) {
|
if ( o.setAttribute ) {
|
||||||
o.setAttribute(a,v);
|
o.setAttribute(a,v);
|
||||||
|
|
Loading…
Reference in a new issue