Trying to assemble a rather complex jQuery selector here, and having trouble.
Essentially, I\'m trying to grab all anchors that that 1) do not have a \"rel\" of \"fa
Shouldn't it be:
$("a:not([rel='facebox'],[href^='mailto'])");
You want the :not selector
$("a:not([rel=facebox],[href^=mailto])");
EDIT: I stole your answer for correctness
Alright Mr. Jeremy Ricketts. Jquery has messed up your head. You are trying to chain selector logic...kind of like how jQuery chains methods. In your second selector (a[href!^="mailto"]
) you are trying to say...NOT things that contain THIS attribute. What you are saying is "Search for all things that are not mailto" and "Search for all things that contain mailto". It's like light filters...if you filter red light...and throw a yellow light filter on top...you are not filtering for orange light...you just filtered out EVERYTHING (sorry for the stretch of an analogy). So what you are trying to do is use the pseudo selector :not.
Like this - $(a:not([href^=mailto:])).whateverJqueryMethodYouWant();
EDIT:
Well now that you have spec'd out the question properly...you can do it like this - $(a:not([href^=mailto:] , [rel=facebox])).whateverJqueryFunctionYouWant();