tags:

views:

1051

answers:

2

Hello i need to remove a form tag but non the content:

<form id="form">
<div> not remove this only the form tag</div>

</form>
A: 

When you remove the form tag from the DOM, all of its children elements go right with it. The only way you could achieve what you are asking is to pull all of the form tag's immediate children and append them to some other node in the DOM to keep them from disappearing from the page

jlech
+9  A: 
$form = $('#form');
$form.replaceWith($form.html());

Should do what you need.

Alex Sexton