Home › Forums › Basel support forum › Compact Single Product Design Accordion
Compact Single Product Design Accordion
- This topic has 9 replies, 3 voices, and was last updated 7 years, 5 months ago by Artem Temos.
-
AuthorPosts
-
April 18, 2017 at 8:56 am #12448
AtelierAlvesParticipantHi,
I’ve looked around Basel Support Forum and the Themeforest comments section and it looks like there are a few requests to make the accordion of the Compact Product Design to be closed by default and I’m very much one of them.
Is there already a code you could kindly provide me to make that happen? I already disabled the scroll, but It’d be perfect if the accordion was closed by default so that my clients can see there’s more info bellow.
Thank you so much for your work!
April 18, 2017 at 9:54 am #12450
Artem TemosKeymasterHello,
Try to add the following code snippet to the Custom JS field in Theme Settings
setTimeout(function() { var $tabs = jQuery( '.wc-tabs, ul.tabs' ).first(); $tabs.parent().find('#tab-basel_additional_tab').hide(); $tabs.parent().find( '.basel_additional_tab_tab' ).removeClass('active'); }, 10);
Regards
April 18, 2017 at 10:01 am #12452
AtelierAlvesParticipantHi,
Thank you so much for your fast reply, I’ve tried that code before and tried it again but it doesn’t work :/
Anything else you can think of?
April 18, 2017 at 10:05 am #12453
Artem TemosKeymasterPlease, send us a link where we can see it.
April 18, 2017 at 10:14 am #12455
AtelierAlvesParticipantApril 18, 2017 at 11:05 am #12457
Artem TemosKeymasterSorry, try this instead
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);
Regards
April 18, 2017 at 11:15 am #12458
AtelierAlvesParticipantHi again,
It still isn’t closed by default ๐ฎ
Could it be cache? I already emptied it, though… I’m checking it on Google Chrome, if you wanna know.
Thank you so much for your time on this ๐
April 18, 2017 at 11:23 am #12459
Artem TemosKeymasterTry to add it to “On document ready” section.
May 25, 2017 at 10:59 pm #14404
svaldesmParticipantHello, is there a smarter way to do this?
Basically we are calling a function to open them and another to close them, I imagine if they were closed on the start would be better.
Thanks!May 26, 2017 at 6:39 am #14409
Artem TemosKeymasterHi,
The problem is that opening function is called in WooCommerce files. And the only one way to prevent this is to customize WooCommerce JS files. And we can’t say that it would be a smarter way since you will need to perform this work on each plugin update.
Regards
-
AuthorPosts
Tagged: Accordion, product, woocommerce
- You must be logged in to create new topics. Login / Register