title: First failing jQuery.ready() breaks the rest
body: <p>We allow users to write code which sometimes calls <code>jQuery.ready(function(){..})</code> multiple times. It seems like the first function call that throws an error prevents execution of the rest of the functions.</p>
  
  <p>There was a discussion about this <a href="https://stackoverflow.com/questions/5263385/jquery-multiple-document-ready">here</a> with the solution wrapped <code>jQuery.ready()</code> in a delegate instead of wrapping the anonymous function parameter passed to <code>jQuery.ready(..)</code>.</p>
  
  <p>How can I override <code>jQuery.ready(fn)</code> and wrap the passed-in function parameter in a delegate which wraps it in try/catch and the passes to <code>jQuery.ready(delegate)</code>?</p>
  
  <p>Here is an example:</p>
  
  <pre><code>&lt;head&gt;
    &lt;script&gt;
      // here is some code from third-party developer that sometimes throws an error
      jQuery.ready(function() {
        if ((new Date()).getMonth() == 0) 
          throw Error("It's January!");
      });
    &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;script&gt;
      // here is my code which should run regardless of the error in the &lt;head&gt; script
      jQuery.ready(function() {
        alert("I need to run even in January!");
      });
    &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>What can I do to make code in  run regardless of errors in ?</p>