5,953
edits
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
// Template:TLP drawer | // Template:TLP drawer | ||
function TLPExpand( | function TLPExpand(x) { | ||
var | var y = "tlp-children-".concat(x); //kinda "tlp-children-1.21" | ||
var | var z = document.getElementById(y); //kinda document.getElementById("tlp-children-1.21") | ||
var | var a = "tlp-button-text-".concat(x); //kinda "tlp-button-text-1.21" | ||
var | var b = document.getElementById(x); //kinda document.getElementById("tlp-button-text-1.21") | ||
if ( | if (z.style.display === "block") { | ||
z.style.display = "none"; | |||
b.innerHTML = "Expand"; | |||
} else { | } else { | ||
z.style.display = "block"; | |||
b.innerHTML = "Collapse"; | |||
} | } | ||
} | } |