]> source.dussan.org Git - jquery.git/commitdiff
Fixed not being able to set the disabled value of an element using .attr(). Ticket #8
authorJohn Resig <jeresig@gmail.com>
Fri, 16 Jun 2006 02:25:10 +0000 (02:25 +0000)
committerJohn Resig <jeresig@gmail.com>
Fri, 16 Jun 2006 02:25:10 +0000 (02:25 +0000)
jquery/jquery.js

index c377f63d5ac14ee1832a476249ae4592a77d9147..4f92ce2bb069f0e0a73448259826a61e06ae1a49 100644 (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);
                        }
                }