MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 123: Line 123:
function drawerExpand(x) {
function drawerExpand(x) {
   var y = "drawer-"+x; //outputs something like "drawer-1"
   var y = "drawer-"+x; //outputs something like "drawer-1"
  console.log("variabile y: "+y);
   var z = document.getElementById(y); //outputs something like document.getElementById("drawer-1")
   var z = document.getElementById(y); //outputs something like document.getElementById("drawer-1")
   var a = "drawer-button-"+x; //outputs something like "drawer-button-1"
   var a = "drawer-button-"+x; //outputs something like "drawer-button-1"
  console.log("variabile a: "+a);
   var b = document.getElementById(a); //outputs something like document.getElementById("drawer-button-1")
   var b = document.getElementById(a); //outputs something like document.getElementById("drawer-button-1")
   if (z.style.display == "block") {
   if (z.style.display == "block") {