Description tab has to be closed automatically
-
Hi,
I have a question about the theme on Product level. When new customers open my website on mobile, the ‘Description’ tab is opened automatically. This tab is very long so I have a chance they don’t see the crossing products. How can I change this in a way that when new customers visit my site, the ‘Description’ tab is automatically closed, just like the other tabs.
I’ve attached 2 images where you can see the difference.
Thank you.
Jelle
Hello,
Thank you very much for choosing our theme and for contacting us.
Please clarify: do you want to close all tabs on mobile or on the desktop as well?
Here is the code to keep them closed on all the devices:
setTimeout(function() {
var $tab = jQuery('.woodmart-tab-wrapper').find('a.active');
$tab.siblings('.wc-tab').hide();
$tab.removeClass('active');
}, 10);
Add the snippet to the Custom JS section in Theme Setting.
Best Regards
Hi,
I want it only to close on mobile.
What do I have to do?
Hello,
Please replace the code with this one:
if (jQuery(window).width() <= 768) {
setTimeout(function() {
var $tab = jQuery('.woodmart-tab-wrapper').find('a.active');
$tab.siblings('.wc-tab').hide();
$tab.removeClass('active');
}, 10);
}
Best Regards
Hi,
Thank you.
It’s not closing (yet) on all products. Just on some of them. Does it take a little time?
Hello,
Please provide your site admin access to the private area. I will check.
I am checking on my site it works correctly.
Best Regards