How to get the primitive value of a checkbox?
<p>Edit: Okay, I had to redo the example because the problem didn't occur in my first example</p>

<pre><code>function CheckboxClick(checkbox, check) {
    this.checked = check;

    checkbox.click(function (event) {
        alert(this.checked);
    });
}


CheckboxClick($("#checkbox"), $("#checkbox").attr("checked"));
</code></pre>

<p>Every time you click on that checkbox, this.checked's value changes. What do I need to do to get it to stop changing? It's obviously assigning by reference but I don't know how to get the primitive value. I tried valueOf() but that didn't work for me. </p>
