Hey there all, I am trying to create a link from one tab to another within a panel node.

trying this:

<a href="#tab3">Back to last tab</a>

Does append the URL as in mysite.com/site#tab3", but does not actually work, does not load "Tab3". If I place mysite.com/site#tab3 into URL line of browser, then the correct tab does load.

There has to be some way of doing this, but googling is not turning up anything for me. Thanks!

Comments

wim leers’s picture

Version: 5.x-1.5 » 6.x-1.x-dev

The question also applies to 6.x, so moving there.

SamRose’s picture

Any ideas about how we might do this?

smoothify’s picture

Status: Active » Closed (duplicate)

This would be a cool feature to have, it would probably need to go into tabs module and there is an issue about this in their queue.

#540180: Set active tab

smoothify’s picture

Actually, I've just noticed that this behaviour does work when clicking links from other pages on the site with the format

http://example.com/page#tab-title

It doesn't work with anchor links on the same page - for now, if you need that functionality there is some information on how to do it via jquery javascript.

http://jqueryui.com/demos/tabs/#...select_a_tab_from_a_text_link_instead...

finex’s picture

I've observed the same behaviour, unfortunatly the js code suggested on the jquery page works partially: the tab content is switched but the tabs navigation bar doesn't update even when you click on a tab navigation item itself.

It looks that with http://jqueryui.com/demos/tabs/#...select_a_tab_from_a_text_link_instead... the "active" CSS class is not added/removed to the tabs navigation bar.