Identify which checkbox was clicked
<p>I have a set of checkboxes on my page. Code for one of them:</p>

<pre><code>&lt;div&gt;
            &lt;label for="ViewAsWebpage"&gt;
                {{#if this.ViewAsWebpage}}
                    &lt;input type="hidden" id="ViewAsWebpage" name="ViewAsWebpage" value="true"/&gt; 
                    &lt;input type="checkbox" class="enable-checkbox" checked /&gt; 
                {{else}}
                    &lt;input type="hidden" id="ViewAsWebpage" name="ViewAsWebpage" value="false"/&gt; 
                    &lt;input type="checkbox" class="enable-checkbox" /&gt; 
                {{/if}}
                &lt;span&gt;View as Webpage&lt;/span&gt;
            &lt;/label&gt;
        &lt;/div&gt; 
</code></pre>

<p>I am trying to set the value to true/false based on user clicks and then want to post that value when the form is submitted as follows:</p>

<pre><code>$('input.enable-checkbox').click(function (e) {

                    if ($('input.enable-checkbox').parent().attr("for") == "ViewAsWebpage") {
                        var checked = $('#ViewAsWebpage').is(":checked");
                        $('#ViewAsWebpage').attr("value", checked);

                    }  
</code></pre>

<p>Is there a better way to set the checkbox value to True/False by identifying the checkbox that was clicked on the page (there are multiple)?</p>
