JSFiddle - React, Tailwind, and code Playground

by envira

HTML

<button id='content-button'>Show Content</button>
<div id='content'>Hello World</div>

CSS

#content {
    display:none;
}

JavaScript

jQuery(document).ready(function(){
    jQuery('#content-button').live('click', function(event) {
        $('#content').is(":visible")?$(this).text("Show Content"):$(this).text("Hide Content");       
         jQuery('#content').toggle('show');
    });
});