Drawer open

Description

This event fires after the user opened the Drawer via the Cart Launcher, by clicking the add to cart button or when the Drawer opens programmatically—for example with a JS method.

Arguments

ArgumentTypeDescription
drawerobjectHolds the drawer with all options and properties.

Example

window.addEventListener('DOMContentLoaded', (event) => {
    const my_prefix = window.CartPops;

    my_prefix.drawer.on( 'show', function( drawer ) {
            console.log(`The ${drawer._type} showed up :)!`);
            // Do Analytics or show something
    } );
});

Keep in mind

Custom development is outside the scope of our support. However, if you’re looking for more advanced support, our team is happy to refer you to a trusted source.

It's time to improve your WooCommerce Cart

CartPops is a WooCommerce Add To Cart Popup, that helps every shop owner improve their user experience, increase conversions & maximize profits.

Was this page helpful?