Home Forums WoodMart support forum Want Single Product Page All Tabs Close.

Want Single Product Page All Tabs Close.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #350328

    Faizan Chauhaan
    Participant

    When i use my website via mobile and open single product then “DESCRIPTION” Tab auto open. i want as a DESCRIPTION and other ADDITIONAL TABS “Default Collapse Closed”

    Attachments:
    You must be logged in to view attached files.
    #350339

    Hello,

    Please try this code, add it to the Theme Settings > Custom JS: On document ready.

    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

    #350346

    Faizan Chauhaan
    Participant

    Not working
    and i want this code only for mobile view.
    i mean when i open my website with mobile. then DESCRIPTION and other ADDITIONAL TABS “Default Collapse Closed”

    #350350

    Faizan Chauhaan
    Participant

    This Code is worked but i want this code only for mobile.

    Topic Link: https://xtemos.com/forums/topic/tabs-sections-on-product-page/

    Code:
    setTimeout(function() {
    var $tabs = jQuery( ‘.wc-tabs, ul.tabs’ ).first();
    $tabs.parent().find(‘#tab-description’).hide();
    $tabs.parent().find( ‘.tab-title-description’ ).removeClass(‘active’);
    }, 10);

    #350796

    Hello,

    You can change this value in the code as per your needs: <= 768 (in the code I have provided above.

    If you have any questions please feel free to contact us.

    Best Regards

    #350820

    Faizan Chauhaan
    Participant

    How can i change this value? I can’t understand sorry im not expert about coding.

    This code not working
    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);
    }

    And this one work but mobile and pc virw both. I want just for mobile view

    
    setTimeout(function() {
    var $tabs = jQuery( ‘.wc-tabs, ul.tabs’ ).first();
    $tabs.parent().find(‘#tab-description’).hide();
    $tabs.parent().find( ‘.tab-title-description’ ).removeClass(‘active’);
    }, 10);
    #350870

    Hello,

    Please check this code:

    if (jQuery(window).width() <= 768) {
        setTimeout(function() {
            var $tabs = jQuery( '.wc-tabs, ul.tabs' ).first();
            $tabs.parent().find('#tab-description').hide();
            $tabs.parent().find( '.tab-title-description' ).removeClass('active');
        }, 10);
    }

    Best Regards

    #350882

    Faizan Chauhaan
    Participant

    Dear Elise Noromit, Thank you so much it’s worked.
    One more question
    Can you tell me its not messup with SEO ? Google crawler read all description?

    #351217

    Hello,

    The tab’s content is not removed from the HTML markup, it is not just visible, and Google crawler would read.

    If you have any questions please feel free to contact us.

    Best Regards

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