JSFiddle - React, Tailwind, and code Playground

by Superman

HTML

<body>
    <a id="hideshowone">Hide</a>
    <div id="hideshowotherone" style="padding:20px; margin:20px; border:2px solid black; width:400px; color:green;" >However, as a practical matter, you will be somewhat more limited if you want your documents to work with a variety of browsers, CSS editors, and JavaScript frameworks.
    As noted in other responses, jQuery has problems with ids that contain periods and colons.</div>

    </body>

JavaScript

$(document).ready(function(){
    $('#hideshowone').click(function(){
$('#hideshowotherone').toggle();
        if($(this).text() == "Hide"){
$('#hideshowone').text('Show');
        }else
$('#hideshowone').text('Hide');            
        });
    
});