Topic on Project:Support desk

Jump to navigation Jump to search

[RESOLVED] Expand collapsed elements by anchor

2 (talkcontribs)

I have a 10 divs with the mw-collapsible mw-collapsed class, they are all working fine but I would like to expand a specific div depending on the anchor in the link.

Is this possible? (talkcontribs)

I found the solution by adding a function to Common.js:

$( document ).ready(function() {
var expandByAnchor = function() {
      var hash = window.location.hash; //Leaves # character
      return (hash);      
      return ('');
Reply to "[RESOLVED] Expand collapsed elements by anchor"