Question:
I try to count each value in each button
The PHP Code
Answer:
You don’t need to use the id’s for this, you can use.find()
to find the child based on your html.Then get the “count” value from your element and add 1 to it.
Problem with having a global counter as you have in
var i = 0;
it will no represent the button you have click, but all of them.If you have better answer, please add a comment about this, thank you!