JSFiddle - React, Tailwind, and code Playground
by Dineshkani
HTML
<div id="firstdiv" class="sample">
<span name="jQuery"> Hello Jquery </span>
</div>
<br/><br/><br/><br/><br/>
<div id="seconddiv" class="sample">
<span name="jQuery"> Hello world </span>
</div>
<input type="button" value="empty" />
<input type="button" value="remove" />
CSS
.sample{
background-color: yellow;
height: 40px;
}
JavaScript
$("input[value='empty']").click(function(){
$("#firstdiv").empty();
});
$("input[value='remove']").click(function(){
$("#seconddiv").remove();
});