JSFiddle - React, Tailwind, and code Playground

HTML

<p>I show up for 3 sec.</p>
<button>Click me !</button>

CSS

p{
    display: none;
}

JavaScript

// Select the element you want to click and add a click event
$("button").click(function(){
    // This function will be executed when you click the element
    // show the element you want to show
    $("p").show();
    
    // Set a timeout to hide the element again
    setTimeout(function(){
        $("p").hide();
    }, 3000);
});