title: pageYOffset Scrolling and Animation in IE8
body: <p>I am working on a scrolling page design and I have the following Javascript to hide and show a dialog box: </p>
  
  <pre><code>        if(window.pageYOffset &gt;= 300){
  
              $('#m1').fadeIn('slow');
  
      }
  
      if(document.documentElement.scrollTop &gt;=300){
  
          $('#m1').fadeIn('slow');
  
      }
  </code></pre>
  
  <p>This works great in Chrome,FF, IE9+</p>
  
  <p>However, in IE8,7 it only kind of works. It shows and hides the element properly but the delay between when it evaluates the scroll position and when it hides the element is horrendous. Also, there is no fade, it just happens. </p>
  
  <p>I am wondering if its just a problem with IE8 that I need to deal with or if there is a way for me to achieve a reactive, clean fade with IE8. </p>