• Resolved Pk

    (@paulka)


    I need the following Js to be called when products are added to the cart:

    $(‘body’).toggleClass(‘drawer-open’);

    How can I do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Pk

    (@paulka)

    So I managed to sort of get it working with

    <script>
    jQuery( function( $ ) {
    $( document ).on('click', '.single_add_to_cart_button', function(e) {
      $('body').toggleClass('drawer-open');
    });
    });
    </script>

    However I would much prefer to use the added_to_cart but that doesn’t seem to be working.

    Any thoughts?

    Plugin Author quadlayers

    (@quadlayers)

    hello @paulka

    sorry but we don’t provide customization support

    kind regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add to cart toggle class “show drawer”’ is closed to new replies.