Problem: How To Return To Active Tab / Set Active Tab After Clicking Link` - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Problem: How To Return To Active Tab / Set Active Tab After Clicking Link`

JC

John Celano

SP Page Builder 3 years ago

I am using the Tabs addon. The problem I have is whenever I return from a link that I've clicked on (with within the content area - in my case it's a text block) I am returned to the 1st tab. Is there no way to return to the active Tab using this addon? I have built an entire site and not being to return to the active will make the user experience disorienting.

Also, is there anyway to set the default active tab?

Joomla 4.1.5 Helix Ultimate https://card2022.chopcme.com/

0
5 Answers
JC
John Celano
Accepted Answer
3 years ago #81125

Wow not one answer here?

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 3 years ago #81303

Hi there,

Thanks for contacting us. Sorry, right now this feature/functionality is not available. But we will try to considering it for future update. Even we are not sure when that gonna happen.

-Thanks

0
JC
John Celano
Accepted Answer
3 years ago #81323

I'm sorry, this is such basic functionality. It is really dissapointing. I now have to rewrite this whole thing myself as Raw HTML under deadline. Something, I find i have to do with you all to frequently. Ah well, You get what you pay for. So long Joomsahper. It was ok while it lasted.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 3 years ago #81450

It was ok while it lasted?

Which version works?

0
JC
John Celano
Accepted Answer
3 years ago #81488

I rewrote the tab function as html (you can see the code on the site). All that is required is a little javascript to achieve the desired behaviour. I am using the browser's local storage object to return to the active tab. This works just like hitting the back button on the browser. Another way to do this is with a data toggle in Bootstrap, which is baked into to Joomla.

$(document).ready(function(){ $('a[data-toggle="tab"]').on('show.bs.tab', function(e) { localStorage.setItem('activeTab', $(e.target).attr('href')); }); var activeTab = localStorage.getItem('activeTab'); if(activeTab){ $('#myTab a[href="' + activeTab + '"]').tab('show'); } });

This doesn't work with your Tabs addon. This only works by writing the HTML for the Tabs. This is basic, basic functionality and I am stunned that this is not part of your "Tabs" addon. Hope this helps someone else and that you guys will add this or something like it in the future,

0