Addition with checkboxes
<p>How can I to add the cost that is <code>190 + 150</code> from given code and displays on another <code>div</code>, let say <code>div</code> total?</p>

<p>I have already made a variable and stored the respective cost, my target is that when a user checked the checkbox (I have approx 10 checkboxes), the respective prices get added to the total and when unchecked it automatically substracts. Can anyone kindly give me a hint as to how to go about it.   </p>

<pre><code>$(document).ready(function() {
    //var pdf=$('#result').html(" -PDF Document");

    $('#1').click(function() {
        //var row = $(this);
        if (($(this).attr('checked')) == 'checked')
            $('#result').append("-PDF Document &lt;html&gt;&lt;span style=float:right&gt;$190&lt;/span&gt;&lt;/html&gt;");
        else
            $('#result').text("");
    });

    $('#2').click(function(){
        if (($(this).attr('checked')) == 'checked')
            $('#result2').append("-Video &lt;html&gt;&lt;span style=float:right&gt;$150&lt;/span&gt;&lt;/html&gt; ");
        else
            $('#result2').text("");
    });
});
</code></pre>
