JSFiddle - React, Tailwind, and code Playground
by Muthuraman B
HTML
<div align="center">
<button class="act" data-filter="all">All</button>
<button data-filter="apps">Apps</button>
<button data-filter="web">Web</button>
</div>
CSS
button {cursor: pointer;}
.act {color:#f00;font-weight:bolder;}
JavaScript
$(function() {
$( 'button' ).on( 'click', function() {
$( this ).parent().find( 'button.act' ).removeClass( 'act' );
$( this ).addClass( 'act' );
});
});