help with multiple :not class's
I have the following jQuery selector but it is not working. I am unsure of the correct syntax. What I want to do开发者_如何学编程 is select a link with href equal to variable star_link but only if it does not have any of the four classes shown below. Thanks for any help.
$('a[href=' + star_link + ']:not(.smalltext.colors_text.productnamecolor.colors_productname)')
Try this :
$('a[href="'+star_link+'"]:not(.smalltext, .colors_text, .productnamecolor, .colors_productname)');
Note also the double quotes after the href, wich you should always use in that context.
use comma b/w selectors-
$('a[href=' + star_link + ']:not(.smalltext, .colors_text, .productnamecolor, .colors_productname)')
reference multiple-selector
精彩评论