Hello,
The “Skaityti pla?iau” link doesn’t work because it targets a tab which is handled (and initialized) by another script.
In order to make this work correctly, i.e. scroll smoothly and switch to the correct tab if necessary, you’ll to add some extra js code in your page template. Can you do this?
If yes, the javascript to add is:
(function($){
$(window).on("load",function(){
$("a.single_product_read_more.__mPS2id[href$='#tab-description']").on("click",function(e){
e.preventDefault();
$("#tab-title-description a[href$='#tab-description']").trigger("click");
$.mPageScroll2id("scrollTo","#tab-description");
});
});
})(jQuery);
This will work for the “Skaityti pla?iau” link you have in the product’s short description. If you need another link we’ll just need to change the selector.
If you want to add the script above via your theme/child-theme functions.php, the PHP code is:
function ps2id_custom_script(){
wp_register_script( 'ps2id-custom-script', '', array('jquery', 'page-scroll-to-id-plugin-script'), '', true );
wp_enqueue_script( 'ps2id-custom-script' );
wp_add_inline_script( 'ps2id-custom-script', '(function($){
$(window).on("load",function(){
$("a.single_product_read_more.__mPS2id[href$='#tab-description']").on("click",function(e){
e.preventDefault();
$("#tab-title-description a[href$='#tab-description']").trigger("click");
$.mPageScroll2id("scrollTo","#tab-description");
});
});
})(jQuery);');
}
add_action( 'wp_enqueue_scripts', 'ps2id_custom_script' );
Let me know if it works