JSFiddle - React, Tailwind, and code Playground
by David Thomas
HTML
<div id="my0"></div>
<div id="my1"></div>
<div id="my2"></div>
<div id="my3"></div>
<div ></div>
<div id="my4"></div>
<div id="my5"></div>
<div id="my6"></div>
<div></div>
<div id="myty"></div>
<div id="my7"></div>
<div id="my8"></div>
<div id="my9"></div>
CSS
div {
height: 2em;
background-color: #ffa;
border-bottom: 1px solid #000;
}
JavaScript
$('div[id^="my"]').filter(
function(){
return this.id.match(/\d+$/);
}).css('background-color','#0f0');