Jquery Javascript checkbox selection/deselection
<p>I have a HTML form and inside it I have a bunch of checkboxes.</p>

<p>What I am trying to do is this.
- If any one checkbox is selected, I want to set a variavle in javascript.
- if nothing is selected, I want to set that variable to blank.
- I am toggling the class of the checkbox as well.</p>

<p>This is how I am currently doing it.</p>

<pre><code>var checklist = "";
$('.form3 :checkbox').change(function() {           
    $(this).closest('label').toggleClass("checkselected", this.checked);
    if(window.checklist != "OL" )
    {
        window.checklist = "OL";
    }

});
</code></pre>

<p>The problem with this code is, if once the variable is set, I am not sure how to clear it is the user deselects all checkboxes and none of the boxes are selected any longer.</p>

<p>Any suggestion?
(I am using jQuery)</p>
