---
title: "Remove div Element"  
description: "Remove div Element"  
author: "Anonymous User"  
published: 2018-03-27  
updated: 2018-03-27  
canonical: https://www.mindstick.com/forum/34450/remove-div-element  
category: "c#"  
tags: ["jquery"]  
reading_time: 1 minute  

---

# Remove div Element

I want to [delete](https://www.mindstick.com/forum/33620/how-to-delete-record-from-list-in-mvc-using-ajax) [div element](https://www.mindstick.com/forum/158013/how-can-i-vertically-center-a-div-element-for-all-browsers-using-css) on [button click](https://www.mindstick.com/forum/790/form-gets-submiited-twice-on-button-click)

```
<div id="test">
<p>Hi</p>
<p>Mindstick</p>
</div>
<br>
<button>Delete</button>
```

thanks in advance..

## Replies

### Reply by Anonymous User

make a jquery function and use remove function and pass id

```
<script>
$(document).ready(function(){
    $("button").click(function(){
        $("#test").remove();
    });
});
</script>
```


---

Original Source: https://www.mindstick.com/forum/34450/remove-div-element

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
