JSFiddle - React, Tailwind, and code Playground

by Muthuraman B

HTML

<p><button id="myButton">Click Me!</button></p>
<div id="myDiv">
  <p>Some dummy text here....</p>
</div>

JavaScript

$( "#myButton" ).click(function () {
 
    // Set the effect type
    var effect = 'slide';
 
    // Set the options for the effect type chosen
    var options = { direction: 'right' };
 
    // Set the duration (default: 400 milliseconds)
    var duration = 700;
 
    $('#myDiv').toggle(effect, options, duration);
});