Working on Infinite Load in jQuery and can't get the Load function to load only once
<p>I'm working on an <code>Infinite Load</code> (e.g. Lazy Load) type functionality here is the function so far:</p>

<pre><code>$(window).scroll(function() {
       var ScrollPosition = $(window).scrollTop() + $(window).height();
       var LoadMorePosition = $(document).height()-100;
       if( ScrollPosition == LoadMorePosition ) {
           console.log('loading more');
           loadMoreItems();
       }
    });
</code></pre>

<p>It's working for the most part except for that the <code>loadMoreItems</code> function is called 20-30 times once the person scrolls to the threshhold.</p>

<p>I was thinking a setTimeout type thing might work but on second thought I realized that it would only work if the Ajax content loaded fast enough (which isn't guaranteed).</p>

<p>What I need is a way to detect if they hit the threshold and then call the function only once until they hit the scroll threshold again.</p>
