I am using cbpFWTabs (http://tympanus.net/Development/TabStylesInspiration/) but want to open a specific tab upon page load. I have tried to emulate the show method like this in
OPs solution did not work for me, I had to do this:
var triggers = [].slice.call( tabs.querySelectorAll( 'nav > ul > li' ) );
document.getElementById('first-tab').addEventListener('click', function() {
});
if ( location.hash != 0 && location.hash == '#content' ){
triggers[1].click();
}
Where 'first-tab' is the ID of your first tab's anchor:
contact
'content' is the reference in your URL: page.html#content
Changing 'x' in triggers[x] will open the tabbed content corresponding to the hash on page load starting at 0 (so '1' in the example above will open the second tab on the page.)
A downside is that upon changing tabbed item the hash remains the same; maybe someone can improve upon this.