Commit 103d3258 authored by timmywil's avatar timmywil

Follow w3c standard for setting the common boolean attributes to the same...

Follow w3c standard for setting the common boolean attributes to the same name(selected, checked, readOnly, and disabled)
parent 8d2d94cf
...@@ -473,7 +473,10 @@ if ( !jQuery.support.getSetAttribute ) { ...@@ -473,7 +473,10 @@ if ( !jQuery.support.getSetAttribute ) {
jQuery.each([ "selected", "checked", "readOnly", "disabled" ], function( i, name ) { jQuery.each([ "selected", "checked", "readOnly", "disabled" ], function( i, name ) {
jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
set: function( elem, value ) { set: function( elem, value ) {
if ( value === false ) { if ( value === true ) {
elem.setAttribute( name, name );
return value;
} else if ( value === false ) {
jQuery.removeAttr( elem, name ); jQuery.removeAttr( elem, name );
return value; return value;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment