# jQuery re-attaching a div

**URL:** <https://forum.kirupa.com/t/jquery-re-attaching-a-div/330052>\
**Category:** web dev\
**Created:** [November 23, 2012, 7:32pm UTC](https://forum.kirupa.com/t/jquery-re-attaching-a-div/330052 "2012-11-23T19:32:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neuhaus3000](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/neuhaus3000/32/168_2.png) [@Neuhaus3000](https://forum.kirupa.com/u/Neuhaus3000)\
**Post date:** [November 23, 2012, 7:32pm UTC](https://forum.kirupa.com/t/jquery-re-attaching-a-div/330052/1 "2012-11-23T19:32:02Z")

</div>

Hello all,

I have detached a div and want to re-attach it by clicking on a button.  
Here’s the code…

$(’#wrapper’).detach();

$("#open\_menu").click(function(){  
/\* Add something here to re-attach #wrapper \*/  
});

Any help will be appreciated.

Regards,

neuhaus3000
