Removing content from modal and applying on a hidden div