I have a series of checkboxes that represent various food items. I would like to create a subtotal depending on what the user selects. I have been looking through the jQuery documentation and I see how to update the the value of a textbox however how does one do a new tally every time a new checkbox is “checked”. Also, what happens when a checkbox is “un-selected”. Is there a way to store the value of each item in the HTML code of the checkbox?
I have a jsFiddle example I have been fooling with here …