How to pass a variable className to my object function, using JQuery?
<p>I'm new to Object-Orientated-Programming. I am trying to pass a element class as a parameter to a function. I know I've missed something...see code below:</p>

<pre><code>var n = new Object();

n.mousePosition = function(class, y){   
    $(document).mousemove(function(e){
        if(e.pageY &lt; y){ $(class).slideDown(200); }
        if(e.pageY &gt; y){ $(class).slideUp(200); }
    });
}
n.mousePosition('.nav', 100);
</code></pre>

<p>The <code>.nav</code> is the element class name which I'm trying to pass to my function as the <code>class</code> parameter, the <code>$(class).slideDown...</code> is not picking it up</p>

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