JSFiddle - React, Tailwind, and code Playground

by Afzaal Ahmad Zeeshan

HTML

<div class="row slide active">Test</div>
<button>Add Class</button>

JavaScript

$('button').click(function () {
    $('div').attr('class', ''); // remove the class
    $('div').attr('class', 'row slide hidden'); // add class
})