JSFiddle - React, Tailwind, and code Playground

by Vinay Pratap Singh Bhadauria

HTML

<div class="act_nav">click me!</div>

CSS

.active
{
    color:red;
}

JavaScript

jQuery(".act_nav").on("click", function () {
     var str = jQuery(this).attr('id');
     var title = jQuery(this).attr('title');
     jQuery(this).addClass('active');
 });