Hello
I have been using urls in my menu to open up specific tabs in pages.
Last year i had to change urls to this format : /#x-legacy-tab-2
And use this js code:
jQuery( function($){
$( window ).on(‘load resize’, function(){
scroll_to_tab ( location.href.split("#x-legacy-tab-").slice(-1)[0] );
});
function scroll_to_tab ( tab_id ) {
console.log(tab_id);
var tab_nav = $(’.x-nav-tabs .x-nav-tabs-item a[data-x-toggleable="’ + tab_id + ‘"]’);
if(tab_nav.length >=1) {
$( tab_nav ).trigger(‘click’);
$(‘html,body’).stop().animate({scrollTop: $(tab_nav).offset().top - ( $(’.x-navbar’).height() + 50 ) },700 ,‘swing’);
}
}
});
jQuery(".x-accordion-toggle").click(function(){
if(jQuery(this).hasClass(‘collapsed’)){
jQuery(this).text(‘Read Less’);
} else{
jQuery(this).text(‘Read More’);
}
});
Now this has stopped working for me and the urls only open the page (don’t open the right tab)
Is there a new way to accomplish this?
Thanks