If I have a list like this:
<ul>
<li class="A"></li>
<li class="A B"></li>
<li class="A C"></li>
</ul>
Using jQuery, how would I select only the first item, but not the other two? In other words, how do I write a selector that will only select an element that does not have class B or C?
You can either use the
:not()selector or.not()method: