I want to setup a click event trigger in jQuery for certain anchor tags.
I want to open certain links in a new tab while ignoring ones with a certain class (before you ask I cannot put classes on the links I am trying to catch as they come from a CMS).
我想排除与100或101类的链接
我试过:
$(".content_box a[class!=button]").click(function (e) {
e.preventDefault();
window.open($(this).attr('href'));
});
但这似乎行不通,还有,我怎么做OR语句才能将100包含在排除项中呢?