‘Description’ tabs to be automatically closed, just like the other tabs.
-
Hello,
I am currently using Accordion style tab and the description tab is open by default.
I want all tabs to be closed by default.
I was looking for a solution in support forum and I found this one ( which does not work);
setTimeout(function() {
var $tab = jQuery('.woodmart-tab-wrapper').find('a.active');
$tab.siblings('.wc-tab').hide();
$tab.removeClass('active');
}, 10);
– Entered that the code in CUSTOM JS > On document ready section but nothing has changed
Please help.
Hello,
Please remove the previous Code and try adding the following Code in the Document Ready Area under Theme Settings >> Custom JS.
setTimeout(function() {
var $tabs = jQuery( '.wc-tabs, ul.tabs' ).first();
$tabs.parent().find('#tab-description').hide();
$tabs.parent().find( '.tab-title-description' ).removeClass('active');
}, 1000);
Best Regards
Thank you for the quick response. It works but not really properly because the description is still visible for a second when the page loads and looks really weird.
Any other suggestions ?
Thank you very much.
Hello,
Please try adding the following Custom CSS in the Global Custom CSS area under Theme Settings >> Custom CSS.
body:not(.ready) .wd-accordion-title.active {
color: var(--wd-link-color);
}
body:not(.ready) .woocommerce-Tabs-panel {
display: none !important;
}
Add the following Custom JS Code Alongside the previous code I provided.
jQuery(document).ready(function(){
jQuery('body').addClass('ready');
});
Then check back.
Best Regards
Hello,
Ok, Tabs are closed by default but when I click to open the tab it wont open.
Sending you ss.
Am I doing something wrong ?
Attachments:
You must be
logged in to view attached files.
Alright sorry, Did not write the code alongside. Fixed now. But still the tab is open for a millisecond even tho I changed 1000 to 10.
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)
jQuery(document).ready(function(){
jQuery('body').addClass('ready');
});
Hello,
Can you please share the WP admin login details of your site so I will check and solve the issue for you?
Best Regards.
Hello,
We have fixed the issue on your website. Please clear cache and check back.
Regards.
Xtemos Studios.
Most Welcome!!!
If you do not mind, can you please leave a 5 stars rating for our Theme & Customer and Technical Support by going here: http://themeforest.net/downloads It will allow us to release more updates and provide dedicated support in future. It would encourage our work a lot. If you like our Theme and Support.
Thanks for contacting us.
Have a great day :-)
Topic Closed.
Best Regards.
The topic ‘‘Description’ tabs to be automatically closed, just like the other tabs.’ is closed to new replies.