Open baralbishwas07 opened 4 months ago
There is a problem with the 'Add to Cart' button functionality when clicked consecutively for different products.
Each product's "added to cart" message should disappear after the timeout, even when buttons are clicked consecutively.
const addedMessage = document.querySelector(`.js-added-to-cart-${productId}`); addedMessage.classList.add('style-addedMessage'); clearTimeout(timeoutId); timeoutId = setTimeout(function () { addedMessage.classList.remove('style-addedMessage'); }, 2000);
Kool
Issue Description
There is a problem with the 'Add to Cart' button functionality when clicked consecutively for different products.
Steps to Reproduce
Expected Behavior
Each product's "added to cart" message should disappear after the timeout, even when buttons are clicked consecutively.
Code Snippet