Scroll to top of page from within Facebook app

When within a facebook app you sometimes want to scroll to the top of the page but outside of the iframe which contains your app. To do that you use the following code in javascript:


 This will only work when your canvas height is set to “Settable”. By default 800px. You can make in settable in the app Dashboard

The scrollTo function uses two parameters. First is x position en second is y position to scroll to.

Geef een reactie

Vul je gegevens in of klik op een icoon om in te loggen. logo

Je reageert onder je account. Log uit /  Bijwerken )

Facebook foto

Je reageert onder je Facebook account. Log uit /  Bijwerken )

Verbinden met %s