title: how to get the selected index of check box from checkboxlist control using jquery?
body: <p>Greetings,
  how to get the selectedindex of check box  from checkboxlist control using jquery?</p>
  
  <p>Update:</p>
  
  <p>This code is giving me selected index equal 0 please advive</p>
  
  <pre><code>&lt;asp:CheckBoxList ID="chkListGroups" runat="server" 
                      style="position:absolute; top: 1115px; left: 745px; bottom: 371px;" 
                      DataSourceID="SqlDSGroups" DataValueField="Groups" 
                      onclick="test()"&gt;
                  &lt;/asp:CheckBoxList&gt;
  
  
  ....................
  java script function
  .....................
    function test(){
    $('#&lt;%=chkListGroups.ClientID %&gt;').click(function() {
                  var selectedIndex = $('#&lt;%=chkListGroups.ClientID %&gt;').index($(this));
  
  
                  alert(selectedIndex);
  
  
              });
          }
  </code></pre>