Nathan Riley
asked on
jQuery Count Totals
As per my last question:
https://www.experts-exchange.com/questions/28310852/Plus-and-Minus-jQuery.html
I have several counters on my page that I can increase and decrease via a + and - sign. There are several on the same page.
Now I'm looking for a way to have a total counter at the bottom of the page that sums all the quantities in realtime as I add or subtract from the counters on my page.
https://www.experts-exchange.com/questions/28310852/Plus-and-Minus-jQuery.html
I have several counters on my page that I can increase and decrease via a + and - sign. There are several on the same page.
Now I'm looking for a way to have a total counter at the bottom of the page that sums all the quantities in realtime as I add or subtract from the counters on my page.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Still you have the same problem as @RainerJ missing a var while declaring qty.
I fixed that and prefixed the variable name with a $. This is a best-practice I use to know just from the variable name that it already holds a jQuery object.
http://jsfiddle.net/AlexCode/5gdeh/4/
Cheers!