title: Checkbox check first time not working, after second time, it is OK
body: <p>I am trying to create a checkbox with label. When user click the label, it will check if checkbox checked. The first time, I click the label, the box is checked, but no alert action. After I click the second time, it start to function, alert action happen. What did I do wrong. I have tried to use individual ID. Click not working either.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script type="text/javascript"&gt;
    var elements = { "emo_lol": "1", "emo_cool": "2", "emo_cute": "3" };
     
    jQuery.each( elements, function( id_name, num ) {
  
      $('#'+ id_name).click(function(){
      
         if ($('#'+id_name +'_checkbox').prop('checked')) {
               alert('Checked');
           }else{
             alert('unchecked');
             }
         });
    });
  &lt;/script&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="checkbox" name="emo_checkbox" id="emo_lol_checkbox"&gt;
  &lt;label id="emo_lol" for="emo_lol_checkbox" &gt;LOL !&lt;/label&gt;
         
  &lt;input type="checkbox" name="emo_checkbox"  id="emo_cool_checkbox"&gt;
  &lt;label id="emo_cool" for="emo_cool_checkbox" &gt;COOL !&lt;/label&gt;
      
  &lt;input type="checkbox" name="emo_checkbox"  id="emo_cute_checkbox"&gt; 
  &lt;label id="emo_cute" for="emo_cute_checkbox" &gt;CUTE !&lt;/label&gt;</code></pre>
  </div>
  </div>
  </p>