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?
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?
I found the solution by adding a function to Common.js:
$( document ).ready(function() {
$(expandByAnchor()).removeClass('mw-collapsed');
});
var expandByAnchor = function() {
if(window.location.hash)
{
var hash = window.location.hash; //Leaves # character
return (hash);
}
else
{
return ('');
}
};