Javascript parameter help needed
<p>I've this function:</p>

<pre><code>$(function() {
$(window).scroll(function(e) {
    var sl = $(this).scrollLeft();
    var lbl = $("#waypoints");
    if (sl &gt; 0) {
        lbl.show('');
    }
    else {
        lbl.hide();
    }
    if (sl &gt; 750) {
        lbl.html("&lt;p&gt;now passed 750&lt;/p&gt;");
    }
    if (sl &gt; 1000) {
        lbl.html("&lt;p&gt;now passed 1000&lt;/p&gt;");
    }
});
</code></pre>

<p>});</p>

<p>Which work when i scroll the browser window. But I need to adjust it, so that it is set for a div (#main) which scrolls inside another div (.content) which has a fixed width and css overflow enabled.</p>

<p>I've tried  <code>$(#main).scroll(function(e) {</code> no joy ...</p>

<p>thanks for reading, any help would be awesome.</p>
