Skip to content

Instantly share code, notes, and snippets.

View apfelbox's full-sized avatar
hi there!

Jannik apfelbox

hi there!
View GitHub Profile
// Function for returning the user to any 'y' position in a Facebook app/tab. Uses jQuery animate, otherwise gracefully falls-back without it.
// Source[1]:
// Source[2]:
function scrollinFacebook (toY, duration) {
if (FB.Canvas.getPageInfo) {
FB.Canvas.getPageInfo (function (pageInfo) {
$({ y: pageInfo.scrollTop })
y: toY