Good afternoon guys.
Again I turn to you about a problem I have. I need to use the syntax below in a modal.
$("#divConsulta").clone().appendTo($("#formFruta"));
In the line below when clicking, I open my modal with the data form to update:
<a href="<c:url value="edita?cod=${fruta.cod}"/>" class="btn btn-success btn-xs" data-toggle="modal" data-target="#update-modal" title="Editar"><span class="glyphicon glyphicon-edit"></span></a>
The problem is that I do not know how to do this:
clone (). appendTo
for my modal.
In short, I do not know if I'm correct, I need to pass the contents of a div that is on a page, that when the modal open button is clicked, the contents of #divConsulta go to the #formFruta that is in a modal Bootstrap.
I hope I've been clear because I've been trying for hours.
Thank you