Filed under Coding
Triggering a Specific Tab in the Gumby Framework
A small trick for raising the right tab when someone lands on a page with a hash in the URL.
For the past few months I have been using the Gumby Framework by Digital Surgeons. One thing that did not come out of the box was a way to raise a specific tab when visiting a page.
I posted a question in the Google+ Gumby community and quickly got help from Adam Chambers, one of the developers. The approach is to read the hash in the URL and activate the matching tab on load.
For example, if a tab has an ID of features and the URL ends with #features, that tab is raised automatically when the page opens.
The pattern is small and does not need a plugin. It listens for the page load, checks the hash, and triggers the tab API for the matching element. Keep an eye on the tab API in the version of Gumby you are using, since the class names moved between releases.