#tab-description getting loaded automatically
-
Hey there,
I am using a jquery simple script to create smooth scroling on my theme.
This is the code i am using in there:jQuery(document).ready(function($){ $("a").on('click', function(event) { event.preventDefault(); // Prevent default anchor click behavior var hash = this.hash; // Store hash $('html, body').animate({scrollTop: $(hash).offset().top}, 800, function(){ window.location.hash = hash; }); }); }); // jQuery(document).ready(function($){
Now as you can see in there the function should run on a button click.
And it also changes the window URL location.For some reason whenever I go into a product page it load #tab-description from that function. It seems like even due i haven’t clicked on any button something in WooCommerce activate that function, change the url and take me to the description part.
So if i go into this page
https://www.site.com/product/After few sec it load this page:
https://www.site.com/product//#tab-descriptionAny change you know what causing it?
Doesn’t seems like it related to any plugin as I disabled them all.
It’s also not coming from the theme as is have tried using that code on different theme as well.Thanks
- The topic ‘#tab-description getting loaded automatically’ is closed to new replies.