From cc9dbd06e5ffa62223e1f2e3dbbdcbbcb2bf5e11 Mon Sep 17 00:00:00 2001 From: Anton M Date: Tue, 7 Dec 2010 03:17:42 +0100 Subject: 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. --- src/attributes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3