title: Drupal7 get changed status of checkbox in node-edit-form with jQuery
body: <p>I have written a small module for Drupal 7 to check if someone is changing the status of a checkbox (field-type "boolean" with name "field_calculate").<br/>
  The rendered HTML-Markup in the edit-form is:</p>
  
  <pre><code>&lt;input type="checkbox" class="form-checkbox" value="1" name="field_calculate[und]" id="edit-field-calculate-und"&gt;
  </code></pre>
  
  <p>To load the JavaScript/ jQuery in the form, i use this (working) code:</p>
  
  <pre><code>&lt;?php function java_form_alter(&amp;$form, $form_state, $form_id){
  if($form_id == 'article_node_form'){
       $form['field_calculate']['#after_build'] = array('_load_my_javascript');
    }
  }
  function _load_my_javascript($element){
      drupal_add_js( drupal_get_path('module', 'java') . '/java.js');
      return($element);
  } ?&gt;
  </code></pre>
  
  <p>On each "article_node_form" the script "java.js" gets loaded. All fine.
  The script is</p>
  
  <pre><code>(function ($) {
  alert("START");
      $('input#edit-field-calculate-und').change(function() {
         alert("KLICK");
      });            
  })(jQuery);
  </code></pre>
  
  <p>When loading the page /node/add/article the alert "START" appears (means: the script gets loaded correctly).
  After that, the content of the page appears.<br/><br/>
  <strong>When clicking/changing the checkbox "Calculate" nothing happens.</strong><br/>
  I <strong>expected</strong> the second alert "KLICK" to appear.</p>
  
  <p>What's wrong? <strong>How to get the change-event fired for a checkbox in the node-form?</strong></p>
  
  <p>Thanks for your help!<br/>
  Tobias</p>