Have an account? Sign in
Login  Register  Facebook
How to this 2 jquery animate like this
I have a page which height is 1500px, I want to open the page, then show the page from top to the bottom for a review, then back to the top. I use this jQuery animate code, but it can not work well. how to write correctly? Thanks.

jQuery(function(){
    $('body,html').animate({
    scrollTop:1500
   }, 3000)
   .animate({
    scrollTop:-1500
   }, 3000);
});
Started: September 22, 2011 Latest Activity: September 22, 2011 animatejquery
1 Answer
You can check out jQuery ScrollTo plugin here. Especially onAfter Event
Here is demo page

Posted: MacOS
In: September 22, 2011

Thanks, Merry Christmas.
September 22, 2011

Your Answer

xDo you want to answer this question? Please login or create an account to post your answer