title: Jquery checkbox checked get attr id on button click
body: <p>How to get checkbox checked attribute id when button clicked in jQuery.</p>
  
  <p>I have list of check boxes with attribute id and a button when I check on checkbox 2 and click button i should get attribute id 2 and so on.</p>
  
  <p><strong><a href="http://jsfiddle.net/3u6e7qn7/" rel="nofollow">FIDDLE</a></strong></p>
  
  <p><strong>html code</strong></p>
  
  <pre><code>&lt;div id="checkboxlist"&gt;
      &lt;div&gt;&lt;input type="checkbox" id="1" class="chk"&gt; Value 1&lt;/div&gt;
      &lt;div&gt;&lt;input type="checkbox" id="2" class="chk"&gt; Value 2&lt;/div&gt;
      &lt;div&gt;&lt;input type="checkbox" id="3" class="chk"&gt; Value 3&lt;/div&gt;
      &lt;div&gt;&lt;input type="checkbox" id="4" class="chk"&gt; Value 4&lt;/div&gt;
      &lt;div&gt;&lt;input type="checkbox" id="5" class="chk"&gt; Value 5&lt;/div&gt;
      &lt;div&gt;
          &lt;input type="button" value="button" id="buttonClass"&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>