JSFiddle - React, Tailwind, and code Playground
HTML
<ul id="test">
<li>first</li>
<li>second</li>
<li>third</li>
</ul>
<br><br>
Observe with jQuery 1.8.0 there is no result for the t2!<br>
With jQuery 1.7.2 there is <br><br>
t1 should be 2 -> <span id="t1"></span><br>
t2 should be 1 -> <span id="t2"></span><br>
JavaScript
$('#t1').text($('#test').find('li:not(:first)').length);
$('#t2').text($('#test').find('li:not(:first):not(:last)').length);