JSFiddle - React, Tailwind, and code Playground
HTML
<Books>
<Book id="1">
<title>Konsertpaleet</title>
<author>Bergen</author>
<summary>1000</summary>
<summary>3000</summary>
</Book>
<Book id="2">
<title>MagnusBarfot</title>
<author>Jack Repcheck</author>
<summary>1200</summary>
</Book>
<Book id="3">
<title>Angels and Demons</title>
<author>Dan Brown</author>
<summary>Robert Langdon is summoned to a Swiss research facility to analyze a cryptic symbol seared into the chest of a murdered physicist.</summary>
</Book>
<Book id="4">
<title>Keep the Aspidistra Flying</title>
<author>George Orwell</author>
<summary>A poignant and ultimately hopeful look at class and society, Keep the Aspidistra Flying pays tribute to the stubborn virtues of ordinary people who keep the aspidistra flying.</summary>
</Book>
</Books>
CoffeeScript
$('#totalbtn').click(function() {
var inputs = $('td.subtotal', '#stock-hotdogs').find('input');
var total = 0;
$(inputs).each(function() {
total += parseFloat( $(this).val().replace(/[^\d\.]+/g, ''));
});
alert(total);
});