Categories
JavaScript Programming

jQuery Not Class Selector to Exclude

For example we want to hide all hyperlinks that do not have “banana” class. How to do that with jQuery?
You can use the javascript code below.

$('a').not('.banana').hide();

Easy right? 😀