Created
April 1, 2013 16:52
-
-
Save codexico/5286141 to your computer and use it in GitHub Desktop.
scrollTo animate Facebook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stackoverflow.com/questions/7193425/how-do-you-animate-fb-canvas-scrollto | |
function scrollTo(y){ | |
FB.Canvas.getPageInfo(function(pageInfo){ | |
$({y: pageInfo.scrollTop}).animate( | |
{y: y}, | |
{duration: 1000, step: function(offset){ | |
FB.Canvas.scrollTo(0, offset); | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment