aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/attributes.js')
-rw-r--r--src/attributes.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/attributes.js b/src/attributes.js
index d163469c7..ac832591a 100644
--- a/src/attributes.js
+++ b/src/attributes.js
@@ -473,7 +473,10 @@ if ( !jQuery.support.getSetAttribute ) {
jQuery.each([ "selected", "checked", "readOnly", "disabled" ], function( i, name ) {
jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
set: function( elem, value ) {
- if ( value === false ) {
+ if ( value === true ) {
+ elem.setAttribute( name, name );
+ return value;
+ } else if ( value === false ) {
jQuery.removeAttr( elem, name );
return value;
}