title: Trigger jquery .on() on page load
body: <p>I am trying to find out if I can trigger some javascript code when page has loaded and not only on <code>keyup</code></p>
  
  <pre><code>$(document).on('keyup', '.some-class', function (e)
  {
      // Some code
  });
  </code></pre>
  
  <p>I have tried the following and that didn't work (my research indicate that it shouldn't work either):</p>
  
  <pre><code>$(document).on('keyup load', '.some-class', function (e)
  {
      // Some code
  });
  
  $(window).on('keyup load', '.some-class', function (e)
  {
      // Some code
  });
  </code></pre>
  
  <p>UPDATE:</p>
  
  <p>My question seems to be unclear in regards to what I want to accomplish. The code works fine when using <code>keyup</code> in an input field.
  But I also want the code to run when the page loads.</p>
  
  <p>I could do this but I am looking for a solution that are more elegant.</p>
  
  <pre><code>hello();
  
  function hello() {
      // Some code
  }
  
  $(window).on('keyup load', '.some-class', function (e)
  {
      hello();
  });
  </code></pre>