From a list of li, how do I tell which one is active with a highlight class using jquery?
For example, I have the ul list
<ul>
<li> 11111111 </li>
<li> 22222222 </li>
<li> 33333333 </li>
<li> 44444444 </li> <---- highlighed white/black by (.highlight) class
<li> 55555555 </li>
</ul>
the selector would be:
or if you loop through the LIs and want to check if it’s active you can use .is()