JavaScript events for developers
Learn to use custom Javascript event listeners and triggers in Hyper theme
1. Page loaded
document.addEventListener('page:loaded', function() {
// Page has loaded and theme assets are ready
})2. Product successfully added to the Ajax cart
document.addEventListener('product-ajax:added', function(evt) {
console.log(evt.detail.product);
});3. Product could not be added to the Ajax cart
4. Cart updated
5. Quick view modal has been opened
6. Quick view modal has been loaded
7. Variant selection changed
8. Collection page is refreshed
9. Trigger cart drawer to refresh
10. Product recommendations loaded
Last updated