• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
Add .mw-collapsible togglers
Line 4: Line 4:     
     $(document).ready(function() {
 
     $(document).ready(function() {
 +
 +
        // custom hidable content and togglers supported by local storage
    
         if (typeof(Storage) === "undefined") {
 
         if (typeof(Storage) === "undefined") {
Line 58: Line 60:     
         function updateContent() {
 
         function updateContent() {
 +
 
             $(".toggle").each(function() {
 
             $(".toggle").each(function() {
 
                 var toggle_element = $(this);
 
                 var toggle_element = $(this);
Line 67: Line 70:  
                 });
 
                 });
 
             });
 
             });
 +
 +
            // .mw-collapsible togglers
 +
 +
            $(".mw-collapsible-expand-all").each(function() {
 +
                var toggle_element = $(this);
 +
                toggle_element.off("click");
 +
                toggle_element.click(function() {
 +
                    $(".mw-collapsible-toggle.mw-collapsible-toggle-collapsed").click();
 +
                });
 +
            });
 +
 +
            $(".mw-collapsible-collapse-all").each(function() {
 +
                var toggle_element = $(this);
 +
                toggle_element.off("click");
 +
                toggle_element.click(function() {
 +
                    $(".mw-collapsible-toggle.mw-collapsible-toggle-expanded").click();
 +
                });
 +
            });
 +
 +
            $(".mw-collapsible-toggle-all").each(function() {
 +
                var toggle_element = $(this);
 +
                toggle_element.off("click");
 +
                toggle_element.click(function() {
 +
                    $(".mw-collapsible-toggle").click();
 +
                });
 +
            });
 +
 
         }
 
         }
  
cssedit, gkautomate
6,928

edits

Navigation menu