JSFiddle - React, Tailwind, and code Playground

by omarqa

HTML

<div class="list-group" id="setActive"> <a href="#">aaa</a>
 <a href="#">bbb</a>
 <a href="#">ccc</a>
</div>

JavaScript

var setActive = document.getElementById('setActive'),
    anchors = setActive.querySelectorAll('a');
for (var i = 0; i < anchors.length; i++)
    anchors[i].className = "list-item";