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?
No related posts.
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?
No related posts.
alternatively you can use :not selector, like this:
$(‘a:not(.banana)’).hide();
easier right?
Mantap gan