triggering an onclick for shopify without it happening on page load
In my liquid template I've tried to create a trigger for a click event but it seems to trigger on page load and causing more product to be added to the cart than is specified.
I admit, I'm new to shopify but can't figure why it would happen on page load...
It turned out that on this project I had to declare any selector used as a variable first.
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.