I am working on a page where the selected item among a list is characterized by NOT having a given class. Something like the following:
<ul>
<li class="a">not selected</li>
<li class="a b">selected</li>
<li class="a">not selected</li>
</ul>
I would like to defined a CSS selector to grab the li node in the page having ONLY the a class. Unsurprisingly the following statement is not enough:
document.querySelectorAll('li.a')
Because it returns ALL the li nodes having the a class.
Any experience on such scenario?