diff options
author | Anton M <obhvsbypqghgc@gmail.com> | 2010-12-07 03:17:42 +0100 |
---|---|---|
committer | Anton M <obhvsbypqghgc@gmail.com> | 2010-12-07 03:17:42 +0100 |
commit | cc9dbd06e5ffa62223e1f2e3dbbdcbbcb2bf5e11 (patch) | |
tree | 5c866cdf8407b3a40d370a1fec07649d7a0355df /src | |
parent | 8943b427f67766fd8d9e8a95b471ff4077213be2 (diff) | |
download | jquery-cc9dbd06e5ffa62223e1f2e3dbbdcbbcb2bf5e11.tar.gz jquery-cc9dbd06e5ffa62223e1f2e3dbbdcbbcb2bf5e11.zip |
Fix attr() problems in IE with attribute nodes. Followup to commit b50f41a2.
IE can't add properties on an attribute-node element, thus we handle it
like text-/comment-nodes.
Diffstat (limited to 'src')
-rw-r--r-- | src/attributes.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/attributes.js b/src/attributes.js index b0e3601f5..78b1bfd20 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -272,8 +272,8 @@ jQuery.extend({ }, attr: function( elem, name, value, pass ) { - // don't set attributes on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) { + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || elem.nodeType === 2 ) { return undefined; } |