title: Why isn't my checkbox change event triggered?
body: <p>I have two functions.</p>
  
  <p>The first function translates a div click into a checked/unchecked toggle.
  The second function translates a checkbox change into a hide/show event.</p>
  
  <p>The problem is that when I use the first function to check/uncheck the box, the second function is not called. I am new to javascript, thanks.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $(":checkbox").parent().click(function(evt) {
          if (evt.target.type !== 'checkbox') {
              var $checkbox = $(":checkbox", this);
              $checkbox.attr('checked', !$checkbox.attr('checked'));
              evt.stopPropagation();
              return false;
          }
      });
  });
  &lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $(":checkbox").change(function() {
          if($(this).attr("checked")) {
              $('.'+this.id).show();
          }
          else {
              $('.'+this.id).hide();
          }
      });
  });
  &lt;/script&gt;
  </code></pre>