admin管理员组文章数量:1323735
My question involves fullpage.js responding to (window).scroll
events. I'm trying to have my application change the navbar on a scroll, but I can't get my site to log any of the scroll events. I tried following questions like: Animate in Nav bar on scroll. When I add the autoScrolling: false
option to fullpage, it remedies the issue, but I would rather not use that option. I want to take advantage of the simple scroll action moving the entire page.
I can provide a jsfiddle example if this is still unclear.
My question involves fullpage.js responding to (window).scroll
events. I'm trying to have my application change the navbar on a scroll, but I can't get my site to log any of the scroll events. I tried following questions like: Animate in Nav bar on scroll. When I add the autoScrolling: false
option to fullpage, it remedies the issue, but I would rather not use that option. I want to take advantage of the simple scroll action moving the entire page.
I can provide a jsfiddle example if this is still unclear.
Share Improve this question edited May 23, 2017 at 11:55 CommunityBot 11 silver badge asked Mar 3, 2014 at 5:29 Jason BJason B 7,4659 gold badges40 silver badges49 bronze badges1 Answer
Reset to default 8You should better use the callbacks provided by the plugin such as onLeave
and afterLoad
.
That would give you the power of firing actions when going from one to another slide.
If you still want to do it with other plugins, then you would need to use fullpage.js with the option scrollBar:true
.
You have more information about it at the documentation.
The reason you can not fire any action by using the scroll
event is because the plugin doesn't really scroll the page but just change the top
property of the site wrapper or add the property translate3d
in case of using the option css3:true
.
本文标签: javascriptFullPageJS ScrollingStack Overflow
版权声明:本文标题:javascript - FullPage.JS Scrolling - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742118739a2421593.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论