I am using the "tab 2" block on one of my pages (http://themes.semicolonweb.com/html/canvas/block-content-tab-2.html). The block appears about 3/4 of the way down the scroll of the page. Each tab contains hyperlinks that direct to other URLs. The links eventually load, however prior to loading the browser jumps back to the top of the page. This is not ideal, because if the user clicks the back arrow to return to the page, it lands back at the top and forces users to scroll back down to get to the section that they originally linked from. Any help would be appreciated. Thanks
Hyperlinks inside of tabs jump to the top of the page
3 replies · opened Jul 28, 2021
Hello,
We absolutely understand about your concern and we have a possible solution for you. Consider pasting the following code at the bottom of your Page after the js/functions.js File JS Linking:
[ch_pre]
jQuery( ".block-tab-2" ).on( "tabsactivate", function( event, ui ) {
event.preventDefault();
history.replaceState({}, '', '#'+ui.newPanel.attr('id') );
});
[/ch_pre]
This should definitely work fine. Hope this Helps!
Let us know if we can help you with anything else or if you find any further issues.
Fantastic, thank you so much for the quick response:)
Very Happy to Help! :)
Have the same question, or something new?
Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.
Reply on the dashboard