More actions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
if (window.innerWidth >= 768) { | if (window.innerWidth >= 768) { | ||
const idsToCollapse = [ | const idsToCollapse = [ | ||
'Muling', | 'Muling', 'Misc', 'Anti-ban', 'Anti-PK', 'Trip_Settings', 'Skills_Settings', 'Equipment' | ||
]; | ]; | ||
Line 17: | Line 11: | ||
var section = header.closest('.citizen-section-heading'); | var section = header.closest('.citizen-section-heading'); | ||
var content = section?.nextElementSibling; | var content = section?.nextElementSibling; | ||
if ( | if (content) { | ||
content.style.display = "none"; // Hide content | |||
content.style.display = "none"; // Hide | |||
} | } | ||
} | } |
Revision as of 14:22, 25 April 2025
$(document).ready(function() { if (window.innerWidth >= 768) { const idsToCollapse = [ 'Muling', 'Misc', 'Anti-ban', 'Anti-PK', 'Trip_Settings', 'Skills_Settings', 'Equipment' ]; idsToCollapse.forEach(function(rawId) { var id = rawId.replace(/ /g, "_"); var header = document.getElementById(id); if (header) { var section = header.closest('.citizen-section-heading'); var content = section?.nextElementSibling; if (content) { content.style.display = "none"; // Hide content } } }); } });