JSFiddle - React, Tailwind, and code Playground

by Khalil Zhang

HTML

<div class="test">test1</div>
<div class="test2">test2</div>
<div class="test">test3</div>

JavaScript

/*
Array.prototype.forEach.call(document.getElementsByClassName('test'), function (ele) {
    ele.style.backgroundColor = 'yellow'
});
*/
$('.test').css('backgroundColor','yellow');
//$('.test').css('background','yellow');