Checkbox not unchecking
<p>I have this code and it works fine, but the problem is the checkbox does not get removed when you click it again, it only gets removed when the span.removePortfolio is clicked. Thanks!</p>

<pre><code>&lt;input type="checkbox" name="portfolio"/&gt; 
&lt;div&gt;
   Has Portfolio &lt;span class="removePortfolio"&gt;X&lt;/span&gt;
&lt;/div&gt;

$("input[name=portfolio]").change(function() {
    loadResults();
    checkPortStatus();
});    

$('span.removePortfolio').live("click", function() {
    $("input[name=portfolio]").removeAttr("checked");
    $('#portfolioRemove').hide();   
});

var portChecked = false;
function checkPortStatus() {
   if((portChecked) == true) {
        $("input[name=portfolio]").removeAttr("checked");
   }
}

function loadResults() {
    if($("input[name=portfolio]").attr("checked", "checked")) {
       portChecked = true;
    }

}
</code></pre>

<p>I simply need the checkbox to be checked when the user clicks it, unchecked when they click it again, and unchecked if it was checked and the user clicks the span.removePortfolio.</p>
