title: How to register events handler after the page load?
body: <p>I hope I'm making the question clear.</p>
  
  <p>Say you have some check-boxes (or any other type of element for that matter) for which you register events handler when the page loads. Then you add some more check-boxes using AJAX (so no page reload). But you also want these newly added check-boxes (after the page was loaded) to have the same registered events handlers?</p>
  
  <p>What I tried was this but I feel there has to be a better approach:</p>
  
  <pre><code>$(document).ready(function () {
  
    // Register custom envets handler
    registerCustomEventHandlers();
  
    $('a').on('click', addExtraFields);
  });
  
  function registerCustomEventHandlers() {
    $('input.class_name').on("change", sayHelloWorld);
  }
  
  function sayHelloWorld() {
    alert('Hello world');
  }
  
  function addExtraFields() {
    // insert some checkboxes...
  
    // register the events handler again for the newly added fields
    registerCustomEventHandlers();
  }
  </code></pre>
  
  <p>So basically inside the function that adds the check-boxes I register again all the events handlers. I was looking at something like this <code>$(document).change(function() {});</code> but apperently it is not supported by all browsers...</p>
  
  <p>Any suggestions?</p>