javascript: data submit from button randomly not working
I am setting up an e-commerce webshop, and would like to have the buttons either show “Add to cart” in red or “Added to cart” in green. I have a working shop without this feature, and a working single button that changes color and text (via SVG and a lot of CSS). When I combine the two, it sometimes works, and sometimes doesn’t, and I don’t find the reason for that.