JSFiddle - React, Tailwind, and code Playground

by deepak sisodiya

HTML

<h2 class="test">This is a heading</h2>
<p class="test">This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>Click me</button>

JavaScript

// jquery 1 hide function

/*
$(this).hide() - hides the current element.

$("p").hide() - hides all <p> elements.

$(".test").hide() - hides all elements with class="test".

$("#test").hide() - hides the element with id="test".
*/

$("button").click(function(){
    $(".test").hide();
});