Using the following source:
<div id="addons">
<div class="addon">
<span class="title"><input type="checkbox" value="addon_1" name="Item 1 title"></span>
<span class="cost">$<em>20</em></span>
</div>
<div class="addon">
<span class="title"><input type="checkbox" value="addon_2" name="Item 2 title"></span>
<span class="cost">$<em>45</em></span>
</div>
<div class="hidden" id="summaries">
<input name="addons_titles" id="addons_titles" type="text" value=""><!-- on checkbox click, add item titles -->
<input name="addons_cost" id="addons_cost" type="text" value=""><!-- on checkbox click, total item cost -->
</div>
</div><!-- end addons -->
I'm trying to
- summarise the titles from ".addon .title input[name]" to input#addons_titles (each title separated by pipe characters - eg: "Item 1 title | Item 2 title")
- and total item costs from ".addon .cost em" to input#addons_cost
Any thoughts much appreciated - thanks!