JSFiddle - React, Tailwind, and code Playground
HTML
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
CSS
.test {
width:100px;
height:50px;
float: left;
clear:both;
border: 1px solid #000000;
}
JavaScript
$('.test:eq(0)').css('backgroundColor', 'red');
//Same as:
//$('.test:nth-child(1)').css('backgroundColor', 'green');