JSFiddle - React, Tailwind, and code Playground
HTML
<div id="red">1</div>
<div id="red">2</div>
<div id="red">3</div>
<div id="red">4</div>
<div id="red">5</div>
<div id="red">6</div>
JavaScript
$(function() {
$('[id="red"]').css('background-color', 'red');
$('[id="green"]').css('background-color', 'green');
});