Remove div in Jquery

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("#div_remove").remove();
});
});
</script>
</head>
<body><div id="div_remove">

This is some text in the div.
<p>Coding 4 Developers</p>
<p>Running Code Website</p>

</div>
<br>

<button>Remove div element</button>

</body>
</html>

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *