Product Page Tab on Mobile
-
Hello,
If I go to a product page on a mobile device and I scroll down until the tabs that describe some more information of the product like delivery etc.. the first is standard open. I don’t want this tab to be standard opened but I want all tabs to be standard closed so the customer sees all tabs immediately. Please advise me how this should be changed.
Hello,
Add the snippet to the Custom JS section (On document ready) in Theme Settings:
setTimeout(function() {
var $tab = jQuery('.woodmart-tab-wrapper').find('a.active');
$tab.siblings('.wc-tab').hide();
$tab.removeClass('active');
}, 10);
Best Regards
Thank you. I did this and this worked and resolved the problem on mobile.
HOWEVER now on PC the text on the first tab is gone and only comes back when you click on it again.
So this is not the solution as it makes for a problem on PC. Please help.
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