5,953
edits
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
// Template:TLP drawer | // Template:TLP drawer | ||
function TLPExpandDe(x) { | function TLPExpandDe(x) { | ||
var | var content = document.getElementById('tlp-children-'+x); //outputs something like document.getElementById("tlp-children-1.21") | ||
var button = document.getElementById('tlp-button-text-'+x); //outputs something like document.getElementById("tlp-button-text-1.21") | |||
var | if (content.style.display == "block") { | ||
content.style.display = "none"; | |||
if ( | button.innerHTML = "Ausklappen"; | ||
} else { | } else { | ||
content.style.display = "block"; | |||
button.innerHTML = "Einklappen"; | |||
} | } | ||
} | } |