I need to make this. I need to open with ajax a form tag in a div, but i need to close this form in other div below, like this:
opening form(header div)
$('#header').html("<form action = '/company/create' method = 'POST'>"+
"<div>"+
//code
"</div>");
closing form(body div)
$('body').html("<div>"+
//code
"</div>"+
"</form>");
i tried two methods, append() and html().