JSFiddle - React, Tailwind, and code Playground
by nabil_kadimi
HTML
<ul>
<li class="hidden">Horse</li>
<li>Bear</li>
<li>Cat</li>
</ul>
<hr />
<ul>
<li>Horse</li>
<li>Bear</li>
<li>Cat</li>
</ul>
CSS
li:nth-child(1):not(.hidden){
color: #0F0;
}
JavaScript
$('li:not(.hidden):first', 'ul').each(function () {
jQuery(this)
.text($(this).text() + ' - jQuery OK')
.filter(function() {return $(this).css('color') == 'rgb(0, 255, 0)' } )
.text($(this).text() + ' - CSS OK')
;
});