Home Forums WoodMart support forum Product Page Tab on Mobile

Product Page Tab on Mobile

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #231738

    Pierreke
    Participant

    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.

    #231763

    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

    #231768

    Pierreke
    Participant

    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.

    #231842

    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

Viewing 4 posts - 1 through 4 (of 4 total)