My cart is incremented using an ajax call. I want to add a class when the counter is 1 and remove a class when the counter is 0. Can someone tell me how can I achieve this without a page load? Is there any ajax query which fires automatically when the counter increments and decrements?
https://prnt.sc/1xaim0a
https://prnt.sc/1xaipj8
2
Answers
I devised a solution.
Why not check, after the ajax call, the value of counter and update according that the class? This is an exemple of ajax callback: