JSFiddle - React, Tailwind, and code Playground
HTML
<div id="1">Hello world</div>
<div id="2">Hello world2</div>
<div id="15">Hello world2</div>
CSS
.foo {
font-size:100px;
}
JavaScript
$(function(){
$( "div" ).each(function( index ) {
if($(this).attr('id') < 10){
$(this).addClass('foo');
}
});
});