Ticket #1733 (closed bug: fixed)
addClass gives error on textnodes
| Reported by: | achun | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.2.2 |
| Component: | core | Version: | 1.2.1 |
| Keywords: | addClass | Cc: | |
| Needs: | Commit |
Description
$("<b>addClass</b>\n<b>addClass</b>").addClass('tmp')
error! in className:add fun
add: function( elem, c ){
jQuery.each( (c || "").split(/\s+/), function(i, cur){
if ( !jQuery.className.has( elem.className, cur ) )
elem.className += ( elem.className ? " " : "" ) + cur;
});
},
fix?
add: function( elem, c ){
jQuery.each( (c || "").split(/\s+/), function(i, cur){
if ( !jQuery.className.has( elem.className||"", cur ) )
elem.className += ( elem.className ? " " : "" ) + cur;
});
},
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
