Remove div Element

Total Post:3

Points:21
JQuery 
C#
 441  View(s)
Ratings:
Rate this:

I want to delete div element on button click

<div id="test">

<p>Hi</p>
<p>Mindstick</p>
</div>
<br>
<button>Delete</button>

thanks in advance..

  1. Post:3

    Points:21
    Re: Remove div Element

    make a jquery function and use remove function and pass id

    <script>
    
    $(document).ready(function(){
        $("button").click(function(){
            $("#test").remove();
        });
    });
    </script>

Answer