How to get the id of the checkbox that has just been checked by the user using jQuery?
<p>I have an asp.net repeater which binds the memberid to the id of the checkbox wrapped in a fieldcontain of jquery mobile.</p>

<pre><code>&lt;div data-role="fieldcontain" style="margin: 0px"&gt;
    &lt;fieldset data-role="controlgroup"&gt;
        &lt;asp:Repeater ID="rpt" runat="server"&gt;
            &lt;ItemTemplate&gt;
                &lt;input type="checkbox" name="chkBox"
                    id="&lt;%# DataBinder.Eval(Container.DataItem, "[MemberId]").ToString() %&gt;"
                    class="custom" /&gt;&lt;label for="&lt;%# DataBinder.Eval(Container.DataItem, "[MemberId]").ToString() %&gt;"&gt;&lt;%# DataBinder.Eval(Container.DataItem, "[LastName]").ToString() %&gt;,
                        &lt;%# DataBinder.Eval(Container.DataItem, "[FirstName]").ToString() %&gt;&lt;/label&gt;                            
            &lt;/ItemTemplate&gt;
        &lt;/asp:Repeater&gt;
    &lt;/fieldset&gt;
&lt;/div&gt;
</code></pre>

<p>I have this jQuery function:</p>

<pre><code>$('input:checkbox[name=chkBox]').change(function () {            
            var id = $(this).attr('id');
            //var isChecked = $(this).attr('checked');   
            var isChecked = $('#'+id).is(':checked');      
});   
</code></pre>

<p>How do I get the id of the checkbox that has just been clicked and tell if it is checked or unchecked by the user as the result of the click action? The current code will loop through all of the checkboxes. The click() does not get caught for some reason so I use change().</p>

<p>Thanks,</p>
