$('.comment').hide(2000);
This fades hides the class comment after two seconds. Is there an easy way to prevent a div with class “comment” from fading by adding an extra class?
<div class="comment">This text hides</div>
<div class="comment nohide">This text should not hide</div>
Adding the nohide class didn’t prevent it from hiding. I’ll probably end up creating a new class, but thought I’d ask.
You can use
:notselector to filter elements:DEMO: http://jsfiddle.net/M6zgw/