At some point I asked a question about how to clone a DIV of a form by clicking a button (+) ...
I got the following answer that helped me back then.
Now, I need to add a new button (-) so that when the user clicks, the cloned div is removed.
Current JS code:
Prepared by: Sergio
function mais() {
var destino = document.getElementById("aqui");
var novadiv = document.createElement("div");
var conteudo = document.getElementById("servico");
novadiv.innerHTML = conteudo.innerHTML;
destino.appendChild(novadiv);
}
I need help implementing a function that does the following:
function menos(){
//remove ultima div clonada...
}
jsFiddle: jsfiddle.net/qf2Lf914/