I’m looking to find any anchor tags that have an href that contain example.com and DONT CONTAIN vendor_id. Something like this…
$('a[href*="example.com" && href!*="vendor_id"]')
here’s an example of the anchor i would find… <a href="http://www.example.com/?vendor_id=1>
Is this possible? Thanks for your help!
Edit: I don’t think there is a selector for ‘does not contain’ but does this work? $('a[href*="example.com"]:not([href*="vendor_id")')
You can use an attribute selector and wrap the second attribute selector in a
:not()working example: http://jsfiddle.net/hunter/X9qna/