FANDOM


  • Hi there, I have seen your message on this thread here

    http://community.wikia.com/wiki/Thread:542414

    and wondered if there are any solutions to having a global button which will expand and collapse multiple sections in the wikimarkup.  I have serched the web for 3 weeks and have not found anything to help me.  I am quite good at html and css and am trying to improve a charity's wiki and am now quite upsettingly stuck!

    Thanks for any help.  Maria

      Loading editor
    • Prinplat switched accounts a lot since that post. They are not currently very active on Wikia.

      You can try using this JavaScript:

      (function() {
          $('#collapse-global-hide').html($('<a>', {
              'class': 'wikia-button',
              text: 'Collapse All'
          })).click(function() {
              $('.mw-collapsible-toggle-expanded').click();
          });
          $('#collapse-global-show').html($('<a>', {
              'class': 'wikia-button',
              text: 'Expand All'
          })).click(function() {
              $('.mw-collapsible-toggle-collapsed').click();
          });
      })();

      Along with this wikitext:

      <span id="collapse-global-hide">Collapse All</span>
      <span id="collapse-global-show">Expand All</span>
        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.