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.
This commit is contained in:
parent
8943b427f6
commit
cc9dbd06e5
2 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue