JSFiddle - React, Tailwind, and code Playground
by wirey00
HTML
<button class='test'>test</button>
JavaScript
$(function(){
$('.test').click(function(){
console.log($(this).attr('class'));
$(this).removeClass('test').addClass('test1');
});
$('.test1').click(function(){
console.log('test1 was clicked'); // never gets here
});
});