powy1993 / fullpage

For desktop(ie5.5+) or mobile webApp without jQuery,create full screen pages fast and simple.
http://1.fullpagechris.sinaapp.com/index.html
749 stars 267 forks source link

如何设置锚点。或者从一个页面的a链接到指定page上? #10

Closed ghost closed 8 years ago

ghost commented 9 years ago

如何设置锚点。或者从一个页面的a链接到指定page上?

akafun commented 9 years ago

var runPage = new FullPage()
你选择的a元素.onclick = function() { runPage.go(runPage.thisPage() + n); }; // 此处 “+” “-” 都可以,详情见demo中的js

powy1993 commented 9 years ago

调用 runPage.go(index) 就可以了