How to slideTo() only if the loadmore button is clicked using jQuery?
<p>In my script I load some posts from external RSS feeds. I have a "load more" button that when it is clicked, calls the <code>loadfeed()</code> function and shows some 10 more posts.</p>

<p>When this happens, there is a <code>slideTo()</code> that slides the browser to the first of the new posts list.</p>

<p>In addition to the "load more" button, I have a timer that checks for any new posts of those feeds. This happens every 3 minutes.</p>

<p>As I said, if you click on the "load more" button, the page is moved with the first new post on the top of your screen. The problem here is that this sliding happens also if you clicked once the "load more" button, you read the articles, and as you read the 3 minutes are passed, you slide back to the first post of the new list you loaded. More specific, when you load (from the default 20) +10 more posts, you will be slided to the 21st post after 3 minutes.</p>

<p>So my question here it is how to avoid this?</p>

<p>this is the #loadmore button that calls loadfeed()</p>

<pre><code>$("#loadmore").click(function() {
    cap += 10;
    loadfeed();

});
</code></pre>

<p>and this is a part of loadfeed() that handles sliding. I have an if statement for the sliding to happen after the default 20 posts. Without this you will be slide to the 11 post after 3 minutes and no "load more" is clicked.</p>

<pre><code>if (cap &gt; 20) {
$(".p" + (cap-9)).slideto({
    slide_duration : 'slow'
});
}
</code></pre>
