scrollTop going back top before scrolling
<p>I have a function which scrolls the page to a given offset. I'm using the parallax effect, so all my elements (and pages, or "slides") are positioned depending on the scroll bar location.</p>

<p>My little problem is that when I click a link to another slide, it scrolls the page to the desired offset, but the event binded is triggered. Which should be OK, to keep the smooth effect. But there's a little glitch, it seems that the <code>scrollTop</code> function goes back to top for a millisecond before executing correctly. So it lookes like theres another page displaying for a millisecond every time I click on a link before scrolling to the right place.</p>

<p>Here is my code: </p>

<pre><code>    for(var i=1;i&lt;8;i++)
    {
        (function(slideNum) {
            var tempName = 'slide'+slideNum;
            //console.log(defaultPositions["slide"+i].top);
            $('a.slide'+i).bind('click', function() {
                $.scrollTo((defaultPositions[tempName].top/slidesScrollSpeed)+1+'px', 800);
            });
        })(i);
    }
</code></pre>

<p>I know it might be hard to find the problem in this code, but it's all I could find that is related to that. Do you know what's wrong?</p>

<p>Thanks!</p>

<p>PS: <code>scrollTo</code> is a jQuery plugin but has the same glitch as <code>scrollTop</code>...</p>
