Close function on button inside the mini-cart offset

This topic has 2 replies, 2 voices, and was last updated 4 years, 4 months ago ago by Rose Tyler

  • Avatar: apontejosec
    apontejosec
    Participant
    August 5, 2020 at 15:25

    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
    August 5, 2020 at 16:23

    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

  • Viewing 2 results - 1 through 2 (of 2 total)

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

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.