How can I exclude tag elements that have a specific class name?
<span class="test" /> <span class="test asd" /> document.querySelectorAll('span.test'); //how to exclude all spans with "asd" as class name?
Advertisement
Answer
Use :not
CSS pseudo-class:
document.querySelectorAll('span.test:not(.asd)');