MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
Line 9: Line 9:
     this.classList.toggle("active");
     this.classList.toggle("active");
     var content = this.nextElementSibling;
     var content = this.nextElementSibling;
     $(content).toggle('slow');
     $(content).toggle('fast');
   });
   });
}
}

Revision as of 17:01, 9 October 2023

/* Any JavaScript here will be loaded for all users on every page load. */


var coll = document.getElementsByClassName("collapsible");
var i;

for (i = 0; i < coll.length; i++) {
  coll[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var content = this.nextElementSibling;
    $(content).toggle('fast');
  });
}