Skip to content

Instantly share code, notes, and snippets.

@codexico
Created April 1, 2013 16:52
Show Gist options
  • Save codexico/5286141 to your computer and use it in GitHub Desktop.
Save codexico/5286141 to your computer and use it in GitHub Desktop.
scrollTo animate Facebook
// 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