Merge branch 'attrFollowupFix' of https://github.com/jitter/jquery into jitter-attrFollowupFix

This commit is contained in:
jeresig 2010-12-09 12:43:10 -05:00
commit b2ea79c401
2 changed files with 6 additions and 6 deletions

View file

@ -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;
}