JQ delete element
by boababy
HTML
<div class="remove">
remove
</div>
<button id="remove-bt" type="button">
remove element
</button>
<div class="empty">
<p>empty</p>
<p>empty</p>
</div>
<button id="empty-bt" type="button">
empty element
</button>
<div class="html">
<p>html</p>
<p>html</p>
</div>
<button id="html-bt" type="button">
use html empty element
</button>
JavaScript
$(function(){
$("#remove-bt").click(function(){
$(".remove").remove()
})
$("#empty-bt").click(function(){
$(".empty").empty()
})
$("#html-bt").click(function(){
$(".html").html("")
})
});