Commit dabe4e3e by Georgina Mondino

Funcion de Armar Tabs

1 parent 0bef61b1
......@@ -14,7 +14,7 @@ function ArmarForm() {
boton.setAttribute("id", "Boton" + n);
boton.setAttribute("value", n);
boton.setAttribute("class", "Botones");
boton.addEventListener("click", HabilitarTab);
boton.setAttribute("onclick", HabilitarTab(this));
let ancho = ((100 - (0.2 * m)) / m) + "%";
boton.style.width = ancho;
let tab = document.createElement("div");
......@@ -27,10 +27,21 @@ function ArmarForm() {
document.getElementById("Tab0").style.display="block";
}
function HabilitarTab() {
for (n = 0; n < m; n++) {
document.getElementById("Tab" + n).style.display="none"
if(doc){}
function HabilitarTab(elemento) {
let IDBoton= elemento.id;
var i, Tabs, Botones;
Tabs = document.getElementsByClassName("Tabs");
for (i = 0; i < Tabs.length; i++) {
Tabs[i].style.display = "none";
}
Botones = document.getElementsByClassName("Botones");
for (i = 0; i < Botones.length; i++) {
Botones[i].className = Botones[i].className.replace(" BotonesActive", "");
}
document.getElementById(IDBoton).style.display = "block";
evt.currentTarget.className += " active";
}
}
\ No newline at end of file
......@@ -21,7 +21,7 @@ html {
margin: 0.1%;
}
.Botones:active {
.BotonesActive {
background-color: var(--Color);
border-bottom: none;
height: 6%;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!