Code:
<div id="wrap">
<div>Hello</div>
<H1>world</h1>
</div>
<button id='btn'>Delete</button>
I need to remove contents inside div->#wrap on button click. the result should be like
<div id="wrap">
</div>
I tried using
$("#btn").click(function(){
$( "#wrap" ).remove();
});