I have detached a div and want to re-attach it when clicking on a button.
Here\'s the code:
$(\'#wrapper\').detach(); $(\"#open_menu\").click(functi
$(function(){ var detached = $('#element_to_detach').detach(); // Here We store the detach element to the new variable named detached $('.element_after_which_you_need_to_attach').after(detached); });