title: CheckBox click not working if it is inside a div having a click event
body: <p>I have a situation where check box check event is not working. I have placed the check-box inside a div which has click event and on that I check/uncheck the check-box.</p>
  
  <pre><code>&lt;div onclick="checkCheckBox('ch_0')"&gt;
      &lt;input type='checkbox' value='20' id='ch_0'/&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and written the script as follows</p>
  
  <pre><code> function checkCheckBox(checkboxId)
   {
       var checkBoxes = $("#" + checkboxId);
          checkBoxes.attr("checked", !checkBoxes.attr("checked"));
          if (checkBoxes.attr("checked") == true) {
              $(this).addClass('selected');
          }
          else {
              $(this).removeClass('selected');
          }
   }
  </code></pre>