title: detect checkbox state change
body: <p>I want to detect if user checks or unchecks a check box within an iframe and set a flag like so. But it does not seem to work as expected. Any pointers on the error on the code?</p>
  
  <pre><code>jQuery("#frameName").contents().find(":checkbox").bind('change', function(){        
              val = true;
              alert("changed");
      });
  </code></pre>
  
  <p>But I can detect if a checkbox is checked by using</p>
  
  <pre><code>var val = jQuery("#frameName").contents().find(":checkbox").is(":checked");
  </code></pre>
  
  <p>I want to be able to detect any state change on a checkbox and set the flag.</p>