When scrolling to top of div hide another div
<p>this is what I have so far:</p>

<pre><code>    $("#main").each(function() {this.scrollTop = this.scrollHeight;

        if ($(this).scrollTop()&gt;0)
         {
            $('#navigation').addClass("nav-hide");
         }
        else
         {
            $('#navigation').addClass("nav-normal");
         }
     });
</code></pre>

<p>So basically, I am trying to figure out when you scroll to the top of a div it will hide the navigation bar. So you could read the div without the navigation bar over it. Any ideas? Thanks.</p>

<p>Here's my JSFiddle: <a href="https://jsfiddle.net/qb15p5g7/3/" rel="nofollow">https://jsfiddle.net/qb15p5g7/3/</a></p>