What is the jQuery alternative to not(‘:not( selector )’)?
Basically lets say this:
var buttons = $('a.buttons');
I am looking for a particular button with the href as ‘#measurement’ and need to add a class to it. The only way I know how to do this is with not(‘:not( selector )’).
buttons.not(':not([href="#measurement"])').addClass('selected');
There has got to be a better way.
.is() // returns boolean
.has() // looks for items inside each element
Any thing out there?
I believe you want
filter:so if you already have
you can get the right one by