not class selector doesn't seem to work with anchor
I have a wrapped set like this:
var $anchors = $('a');
I then do some JQuery code to confirm a deletion and etc... everything was working great until I started adding other anchors to my site that hav开发者_C百科e classes that do different things
I'm trying to use the :not in JQuery to eleminate certain classes from this generic anchor wrapped set, so that the configme delition and etc doesn't occur, but can't seem to get it to work... what am I missing? Here is the updated selector I am trying to use:
var $anchors = $('a:not(".excludedanchorclass")');
No quotes:
var $anchors = $('a:not(.excludedanchorclass)');
You can also use jquery filter
var $anchors = $('a').filter(':not(.excludedanchorclass)');
精彩评论