My HTML code includes the following 3 elements:
<span class="a b"></span>
<span class="a"></span>
<span class="a b"></span>
I am trying to select the element that only has the class "a".
When I use $("span.a")
, it selects all three elements.
Furthermore, I need to perform this selection within a for loop because it determines other calculations.
Although it seems like a simple problem, I am struggling to find a solution.