Home › Forums › WoodMart support forum › Want Single Product Page All Tabs Close.
Want Single Product Page All Tabs Close.
- This topic has 8 replies, 2 voices, and was last updated 2 years, 10 months ago by Elise Noromit.
-
AuthorPosts
-
February 5, 2022 at 7:06 pm #350328
Faizan ChauhaanParticipantWhen 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.February 5, 2022 at 9:07 pm #350339
Elise NoromitMemberHello,
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
February 5, 2022 at 9:41 pm #350346
Faizan ChauhaanParticipantNot 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”- This reply was modified 2 years, 10 months ago by Faizan Chauhaan.
February 5, 2022 at 9:51 pm #350350
Faizan ChauhaanParticipantThis 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);February 7, 2022 at 1:29 am #350796
Elise NoromitMemberHello,
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
February 7, 2022 at 7:07 am #350820
Faizan ChauhaanParticipantHow 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);
February 7, 2022 at 9:55 am #350870
Elise NoromitMemberHello,
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
February 7, 2022 at 10:58 am #350882
Faizan ChauhaanParticipantDear 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?February 8, 2022 at 12:22 am #351217
Elise NoromitMemberHello,
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
-
AuthorPosts
- You must be logged in to create new topics. Login / Register