JSFiddle - React, Tailwind, and code Playground

by jim ulle

HTML

<div id="hello"></div>
<button onclick="clicked()">click me</button>

CSS

#hello { width: 50px; height: 50px; background-color: red; visibility: hidden; }

JavaScript

function clicked() {
    reloadThePage();
    showHello();
}

function showHello(){
    document.getElementById('hello').style.visibility = "visible"; 
}

function reloadThePage() {
    location.reload();
}