Created
September 19, 2014 21:12
-
-
Save nitishn/0b5d295d6e258177bddd to your computer and use it in GitHub Desktop.
JS scroll to a position with Facebook SDK
This file contains hidden or 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
scrollTo: function ( y ) { | |
FB.Canvas.getPageInfo(function(pageInfo){ | |
$({y: pageInfo.scrollTop}).animate( | |
{y: y}, | |
{duration: 500, 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