diff options
author | timmywil <timmywillisn@gmail.com> | 2011-07-09 14:41:58 -0400 |
---|---|---|
committer | timmywil <timmywillisn@gmail.com> | 2011-07-09 14:52:16 -0400 |
commit | 1886d7443453feab0b73f4a7c4b15fbd9401c4af (patch) | |
tree | 2a07bfeb95854fb10e77dfdc0b6f03fab5f26946 /src/attributes.js | |
parent | e6f8951983b8ce1af8986651fd412f9e569504c6 (diff) | |
download | jquery-1886d7443453feab0b73f4a7c4b15fbd9401c4af.tar.gz jquery-1886d7443453feab0b73f4a7c4b15fbd9401c4af.zip |
Check the attribute node value for false for HTML5 booleans when not supported. Fixes #9504.
Diffstat (limited to 'src/attributes.js')
-rw-r--r-- | src/attributes.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/attributes.js b/src/attributes.js index 1e0e79f4b..cbd9561eb 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -496,7 +496,9 @@ jQuery.extend({ boolHook = { get: function( elem, name ) { // Align boolean attributes with corresponding properties - return jQuery.prop( elem, name ) ? + // Fall back to attribute presence where some booleans are not supported + var attrNode; + return jQuery.prop( elem, name ) === true || ( attrNode = elem.getAttributeNode( name ) ) && attrNode.nodeValue !== false ? name.toLowerCase() : undefined; }, |