How do I add and subtract a number in a jQuery .click function?
<p>I will use jQuery to perform the following:</p>

<p>Upon click of elements with the class "checkbox":</p>

<ul>
<li>add class "checkmark"</li>
<li>remove class "checkbox"</li>
<li>update a div with "You have x apps in your request list" where x is the number that have been clicked</li>
<li>When a class with "checkmark" has been clicked, it will subtract from the number that is displayed</li>
</ul>

<p>My example code does not show all of this function, but I am able to accomplish this except for updating the number that have been clicked / "unclicked".</p>

<p>`</p>

<pre><code>$("span.checkbox").click(function() {

    if(!oldVal) {
        var oldVal = "0";
    }

    var newVal = parseFloat(oldVal) + 1;

    var oldVal = newVal;

    $("#wishlistapps").html('&lt;li&gt;You have ' + newVal + ' apps in your request list&lt;/li&gt;');


});
</code></pre>

<p>`</p>
