Home Forums Basel support forum Compact Single Product Design Accordion

Compact Single Product Design Accordion

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #12448

    AtelierAlves
    Participant

    Hi,

    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!

    #12450

    Artem Temos
    Keymaster

    Hello,

    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

    #12452

    AtelierAlves
    Participant

    Hi,

    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?

    #12453

    Artem Temos
    Keymaster

    Please, send us a link where we can see it.

    #12455

    AtelierAlves
    Participant
    #12457

    Artem Temos
    Keymaster

    Sorry, 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

    #12458

    AtelierAlves
    Participant

    Hi 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 ๐Ÿ™‚

    #12459

    Artem Temos
    Keymaster

    Try to add it to “On document ready” section.

    #14404

    svaldesm
    Participant

    Hello, 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!

    #14409

    Artem Temos
    Keymaster

    Hi,

    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

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