JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#" class="tab">tab</a>
JavaScript
$('.tab').on('click',function(){
$(this).addClass('active');
alert('activated');
})
$('.tab').on('change', '.active',function(){
alert('changed');
})