JSFiddle - React, Tailwind, and code Playground

by Ebhor.com The Free Tutorials

HTML

<div class="description">
    <h1>Photography</h1>
    <p>Photography is the science, art and practice of creating durable images by recording light or other electromagnetic radiation, either electronically by means of an image sensor, or chemically by means of a light-sensitive material such as photographic film.</p>
</div>
<input type="submit" value="Toggle" id="toggle" />

JavaScript

$(document).ready(function () {
    $(document).on('click', '#toggle', function (event) {
        $(".description").toggle(2000,function (event) {
            alert("toggle done");
        });
    });
});