jQuery Fetching data and making sum
<p>What i'm trying to do is taking the price of every input checked, making a sum out of it.</p>

<p>Here's my code</p>

<pre><code>    function totalSum(e) {
    e.preventDefault();
    var unit = $("input:checked").parent("dt").siblings("dd").find("span"); 
    total = 0;
    $.each(unit, function(index, obj){
        total += parseInt($(obj).text(), 10);
    });
    $("#totalPrice").html('&lt;span class="count"&gt;€ ' + total + '&lt;/span&gt; â‚¬');
}
</code></pre>

<p>Every unit is found inside its span. Total is set to 0.  I try to call a parseInt on each checked object, then add the total inside a span. In HTML, price is stated like that:</p>

<pre><code>    &lt;dd&gt;&lt;span class="costo"&gt;€199&lt;/span&gt;&lt;/dd&gt;
</code></pre>

<p>So as you see there is the Euro mark. I am afraid it could not be parsed, is this it? Because nothing change! How should I write it? 
Thanks in advance</p>

<p>Ok I feel so ashamed but I cannot get it to work. I decided to put the code at its minimum, so I tried that way</p>

<pre><code>    &lt;body&gt;
    &lt;div class="bla"&gt;&lt;span class="count"&gt;1&lt;/span&gt;&lt;/div&gt;
    &lt;div class="bla"&gt;&lt;span class="count"&gt;1&lt;/span&gt;&lt;/div&gt;
    &lt;div class="bla"&gt;&lt;span class="count"&gt;1&lt;/span&gt;&lt;/div&gt;

    &lt;div id="total"&gt;&lt;/div&gt;
    &lt;script type="text/javascript" src="js/jquery-1.9.0.min.js" /&gt;&lt;/script&gt; 
    &lt;script&gt;
    $(document).ready(function(){


    function sum() {
        var prices = $("div.bla").find(".count");
        total= 0;
        $.each(prices, function(index, obj){
    total += parseFloat($(obj).text());
});

$("#total").html('&lt;span class="count"&gt;'+total +'&lt;/span&gt; €');
    };

});
</code></pre>

<p>
</p>

<p>This should work, yet nothing appear. Could someone be so kind to tell me what's going wrong?!</p>
