Fixed not being able to set the disabled value of an element using .attr(). Ticket #8

This commit is contained in:
John Resig 2006-06-16 02:25:10 +00:00
parent 7eb6a25d5e
commit 7ebe209b32

2
jquery/jquery.js vendored
View File

@ -643,7 +643,7 @@ $.attr = function(o,a,v){
a = a.replace(r,function(z,b){return b.toUpperCase();});
if ( typeof v != 'undefined' ) {
o[a] = v;
if ( o.setAttribute ) {
if ( o.setAttribute && a != 'disabled' ) {
o.setAttribute(a,v);
}
}