mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user