JSFiddle - React, Tailwind, and code Playground
HTML
<div id='content'>Category Contents</div>
<input type='button' id='hideshow' value='Show Categories'>
CSS
#content {
display: none;
}
JavaScript
jQuery(document).ready(function() {
jQuery('#hideshow').live('click', function(event) {
if ($(this).text() === 'Show Categories') {
$(this).text('Hide Categories');
} else {
$(this).text('Show Categories');
}
jQuery('#content').toggle('show');
});
});