We are actively looking for staff to help us build the wiki. If you are interested please join our Discord server and apply.
MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Importing javascript from a separate page) |
||
Line 16: | Line 16: | ||
$('#mw-panel .portal > h3').addClass('collapsed'); | $('#mw-panel .portal > h3').addClass('collapsed'); | ||
}); | }); | ||
importScript('MediaWiki:Masterlist.js'); |
Revision as of 16:57, 25 June 2024
$(document).ready(function() { // Function to toggle the collapse function toggleSidebarCategory(category) { $('#' + category + ' > .body').slideToggle(); $('#' + category + ' > .head').toggleClass('collapsed'); } // Add toggle link to each category header $('#mw-panel .portal > h3').each(function() { var category = $(this).parent().attr('id'); $(this).addClass('head').click(function() { toggleSidebarCategory(category); }); }); // Hide all categories by default $('#mw-panel .portal > .body').hide(); $('#mw-panel .portal > h3').addClass('collapsed'); }); importScript('MediaWiki:Masterlist.js');