Last active
December 7, 2017 12:30
-
-
Save VinnyFonseca/7786609 to your computer and use it in GitHub Desktop.
FB Page Tab anchor click smooth scroll
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
function scrollFBTo(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