Hi @Edward_Whatson, the custom code doesn’t work cross pages. You have to store the click target in Local storage / URL params. Im more familiar with local storage so code might look something like this.
// On all pages, store the clicked target's ID from nav
$('.nav-button').on('click', function(){
localStorage.setItem('tab', $(this).attr('id'));
});
// On How it works page, pull the localStorage
var tab = localStorage.getItem('tab');
$(window).on('load', function() { // You can try $(document).ready as well because load will delay it slightly
$('.'+tab).click();
})
If it doesn’t work, please share your published link for me/others to troubleshoot in the console. Hope that helps.
Edit: Edited the code slightly. Make sure the Tab buttons has a class that matches the Nav button’s ID.
On each of the Tabs, give them the same class as the corresponding nav-button. So Bank connect tab should have bank-connect class. This is the linking point between the two.
On every page that has the How It Works tabs. add this chunk of code
var tab = localStorage.getItem('tab');
$(window).on('load', function() { // You can try $(document).ready as well because load will delay it slightly
$('.'+tab).click();
})
I have tried the code on the published page, it seems to work well. Give it a try
Thanks for your response I’ve done everything you have suggested but it doesn’t seem to work. I’ve named all the classes and IDs correctly to link the tabs to the nav menu, maybe I haven’t put the custom code in correctly.
I think I must be pretty close, I don’t know if you can figure what I’m doing wrong, if not I might just scrap the tabs for individual pages.