How to call javascript function each time user scrolls
<p>I want to call a javascript function each time Facebook updates their feed for a user (when he scrolls). Any idea how I can do that?</p>

<p>This does not work:</p>

<pre><code>if (document.body.scrollTop &gt; 30) {
        addArt();
}
</code></pre>

<p>Thank you</p>