JSFiddle - React, Tailwind, and code Playground

by kyllle

HTML

<a id="slickbox-toggle" href="#">Show Box</a>              
<div id="slickbox">Content goes here.</div>

JavaScript

// hides the slickbox as soon as the DOM is ready  
// (a little sooner than page load)   

$('#slickbox').hide();    
// toggles the slickbox on clicking the noted link    
$('a#slickbox-toggle').click(function() { 
    $(this).text($(this).text() == 'Show Box' ? 'Hide Box' : 'Show Box');
    $('#slickbox').slideToggle(400);     
    return false;   
});