How to activate a tab from a link

I am using Pro 3.

On a page, I am using the latest tabs element, with 3 tabs in it. I want to place a link on some other page such that when I click on that link, I navigate to tab 2. In other words, how do I open a tab (other than the first tab) by using an href. I have tried providing a ID to tab 2 in the Customize section but that does not work.

Any help will be great. Thanks.

1 Like

Hi @amardeepmisha,

Thanks for writing in. To achieve that, you need to assign a value in the Toggle Hash field of each individual tab. Here’s a screenshot of it.

In the screenshot above, I entered tab-2. So your href would be example.com/about/#tab-2.

Hope it helps.

@albrechtx

Thanks for the reply. I was not familiar with this setting so this is very helpful. But this feature does not seem to be working properly, there seems to be some bug either in the feature or in the way I am using it.

When I click on the link at the bottom of the first tab on my test page (see image below), the user does not go to the right location. In particular, the second link takes the user to the next section! I have provided a link to the test page in the secure note.

Hi @amardeepmisha,

It looks like the link is working ok, it activates the tabs but it doesn’t send the users anywhere, in the second link it looks like it takes it to the next section but it actually just stays there, it just that the Immigration has a small content that it pulls the content up.

To activate the tab and also send the user there, try doing this. Set ID to accounting-services and Toggle Hash to tab-accounting-services.

And use the href #tab-accounting-services, this will activate the tab and at the same time send the user to the start of that tab. The value tab- in Toggle Hash is constant, so example you will have values like tab-immigration-services and tab-secretarial-services.

Hope it helps.

Worked perfectly! Thanks for your help.

You’re must welcome,

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.