How do I stop a element hit area from moving off the screen when window is scrolled, JavaScript/Jquery?
<p>When I scroll the window/page the hit area denoted by the 100 value in <code>n.mousePositionY('.nav', 100);</code> moves off the page/screen. Is there a way of always having that 100 value stay on the screen irrespective of scrolling...it's for a navigation menu I'm working on. Here's the code so far:</p>

<pre><code>    //$('.nav').hide();
    var n = new Object();

    n.mousePositionY = function(className, y){
        $(window).mousemove(function(e){
            if(e.pageY &lt; y){ $(className).fadeIn(200); }
            if(e.pageY &gt; y){ $(className).fadeOut(200); }
        });
    }

    n.mousePositionY('.nav', 100); 
</code></pre>

<p>Any help would greatly be appreciated, thanks</p>
