title: window.onload is not firing in IE
body: <p>Here is my code:</p>
  
  <pre><code>var scrollOnLoad = function scrollOnLoad(selector, offset) {
      window.onload = function() {
          if ($(window).height() &lt;= 800) {
              var attempts = 100;
              var interval = setInterval(function() {
                  var h = $(selector).height();
                  console.log("attempt #" + attempts + ", h=" + h);
                  if (h &gt; 0 || !attempts--) {
                      $("body,html").animate({scrollTop : h + offset}, '1000');
                      clearInterval(interval);
                  }
              }, 50)
          }
      }
  }
  </code></pre>
  
  <p>and here is how its caling:</p>
  
  <pre><code>scrollOnLoad(".content-wrapper", 50);
  </code></pre>
  
  <p>I've noticed that window.onload event is not firing in IE (console is not logging anything) - any ideas why? Thanks in advance!</p>