JQuery Check if input is empty not checking onload?
<p>I am using this code to check if an inputbox is empty or not and it works fine but it only checks check a key is press not when the page loads.</p>

<p>It's does what it should but I also want it to check the status when the page loads.</p>

<p>Here is the current code:</p>

<pre><code>$('#myID').on('keyup keydown keypress change paste', function() {
  if ($(this).val() == '') {
    $('#status').removeClass('required_ok').addClass('ok');
  } else {
    $('#status').addClass('required_ok').removeClass('not_ok');
  }
});
</code></pre>
