Close function on button inside the mini-cart offset

1 reply2 participantsUpdated by Rose Tyler

  • Avatar: apontejosec
    apontejosec
    Participant

    Hi there,

    I would like to add a “Continue Shopping” extra button inside the minicart offset that on-click- it should close the window (same function as the X icon).

    I am aware that I can add the button html code under the “mini cart promo message” text field. I tried adding the .et-close class to the button but it did not worked. Any ideas?

    Thanks!

    1 Answer

    Avatar: Rose Tyler
    Rose Tyler
    Support staff

    Hi,

    Thanks for using our theme.
    1/ you can add custom html inside that promo text with custom class
    2/ via child-theme/js/theme-child.js ( create this file and include it in function.php of child-theme) add some trigger event for your custom class to close the popup
    3/ code example: jQuery(‘.custom-close-button’).on(‘click’, function() {
    jQuery(this).parents(‘.et-mini-content’).find(‘.et-close’).trigger(‘click’);
    });

    Regards

You must be logged in to reply to this topic.Log in/Sign up