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
750 stars 267 forks source link

放在page内部的按钮通过事件监听触发FullPage.go()方法,并不能有效执行 #38

Closed gyrate closed 8 years ago

gyrate commented 8 years ago

RT。 $('#btn').bind('click',function(){ fullpage.go(3); }) //不能正常执行

当前解决方法为创建周期函数不断地触发,直到正常执行。

$('#btn').bind('click',function(){ var _inter = setInterval(function () { if (me.myPages.thisPage() !== 3) { me.myPages.go(3); }else{ clearInterval(_inter); } }, 300); `}

powy1993 commented 8 years ago

$('#btn').bind('click',function(){ 执行内容 })

这里面也应该用 me.myPages.go(3); 这样的吧?

gyrate commented 8 years ago

并不能正常地执行,必须不断点击直到成功,在android尤其明显。

powy1993 commented 8 years ago

移动端的话要绑定 ontouchend 哦