More actions
Created page with "→Any JavaScript here will be loaded for all users on every page load.: $(document).ready(function() { // Target the 'Muling' header and collapse it by default. // Assuming the header is part of the collapsible structure. var headerText = 'Muling'; // Replace with the exact header text, e.g., "Muling" var header = $("span.mw-headline:contains('" + headerText + "')").closest(".mw-collapsible"); // Collapse the header section if (header.le..." |
No edit summary |
||
Line 2: | Line 2: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
// | // Find the header with the text "Muling" | ||
var targetHeader = $("span.mw-headline:contains('Muling')"); | |||
var | // Check if the header exists | ||
if (targetHeader.length) { | |||
// Collapse the section by adding the 'collapsed' class | |||
var collapsibleSection = targetHeader.closest(".mw-collapsible"); | |||
if (collapsibleSection.length && !collapsibleSection.hasClass('collapsed')) { | |||
collapsibleSection.addClass('collapsed'); | |||
} | |||
} | } | ||
}); | }); |
Revision as of 01:05, 2 April 2025
/* Any JavaScript here will be loaded for all users on every page load. */ $(document).ready(function() { // Find the header with the text "Muling" var targetHeader = $("span.mw-headline:contains('Muling')"); // Check if the header exists if (targetHeader.length) { // Collapse the section by adding the 'collapsed' class var collapsibleSection = targetHeader.closest(".mw-collapsible"); if (collapsibleSection.length && !collapsibleSection.hasClass('collapsed')) { collapsibleSection.addClass('collapsed'); } } });