Board Thread:Support Requests - Getting Technical/@comment-3211055-20150129170238/@comment-452-20150130014037

You're right that it ought to, but the tabber extension generally loads after the rest of the page (if it doesn't fail completely), so that would run before the tabber script loads, so the tabShow function wouldn't exist. (I'm unsure why it isn't bundled with the resource loader.)

I ran into this problem myself last week writing a "pick a random tab" script.

Here's my solution merged with Spottra's solution: tabberOptions = { onLoad: function { if (window.location.hash) { var hash = (window.location.hash).replace('#', '').replace(/_/g, ' '); var currentTabber = this; $(".tabbernav li a", this.div).each(function(i) {         if ($(this).attr("title") === hash ) currentTabber.tabShow(i);       }); delete currentTabber; }  } }; I've tested it out, and it works perfectly for me. (It could probably be written to be a little neater.)

The onLoad function runs for each tabber on the page, so if there are multiple tabbers with the same tab name, it will switch to all of them.

This is a great idea, Aeris Ventaile!


 * edited to convert underscores to spaces
 * edited to check whichtab was set

Edit: I tried to find a way to get rid of "whichtab" completely, but I couldn't figure it out, maybe someone else can.

edit: whichtab removed, replaced by currentTab.