construct.js
596 Bytes
function removeField(b){
let div = b.parentElement;
let tab = div.parentElement;
tab.removeChild(div);
}
function addField(b){
let newfield = document.createElement("div")
newfield.innerHTML = document.getElementById("fieldTemplate").innerHTML;
b.parentElement.appendChild(newfield);
}
function removeTab(b){
let div = b.parentElement;
let tab = div.parentElement;
tab.removeChild(div);
}
function addTab(t){
let newtab = document.createElement("div")
newtab.innerHTML = document.getElementById("tabTemplate").innerHTML;
t.appendChild(newtab);
}