title: Problems with menu fixed top on scroll, when html document not enough height?
body: <p>I do a menu fixed top when scroll, it ok with some pages have large height, but in page has not enough height, this script loop:</p>
  
  <p><strong>Example:</strong></p>
  
  <p>I have menu with height 50px and i write a script:</p>
  
  <pre><code>if ($(this).scrollTop() &gt; 50){
      // add class fixed
  } else { //remove class }
  </code></pre>
  
  <ul>
  <li>on pages with large height this run: <code>scroll(over 50px) &gt; add class</code></li>
  <li>on pages with small height this run: <code>scroll(over 50px) &gt; add class &gt; remove class</code></li>
  </ul>
  
  <p>Please see this example: <a href="http://jsfiddle.net/F4BmP/2930/" rel="nofollow">http://jsfiddle.net/F4BmP/2930/</a></p>