Scroll fixed div to certain point
<p>I have seen a few examples of these, but mine is a little different and can't figure this out.</p>

<p>I'm using a piece of jQuery found on these forums, to scroll a fixed div to certain point then stopping, using 'scrollTop'.</p>

<pre><code>var windw = this;

$.fn.followTo = function ( pos ) {
    var $this = this,
        $window = $(windw);

    $window.scroll(function(e){
        if ($window.scrollTop() &gt; pos) {
            $this.css({
                position: 'absolute',
                top: pos
            });
        } else {
            $this.css({
                position: 'fixed',
                top: 40
            });
        }
    });
};

$('#scrollto-menu-nav').followTo(250);
</code></pre>

<p>However, I need it to stop scrolling when it reaches a height from the <strong>bottom</strong> not from the <strong>top</strong>. Any ideas?</p>

<p>Thanks,
R</p>
