JSFiddle - React, Tailwind, and code Playground
HTML
<ul>
<li class="active">Whatever</li>
<li class="inactive">Whatever</li>
<li>Whatever</li>
<li>Whatever</li>
</ul>
JavaScript
var $ul = $('ul');
if($ul.find("li").length > 2 && $ul.find('.active, .inactive').length == 2) {
alert('yes, it is this way');
}