最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Any way to disable scroll functionality of fullpage.js temporarily? - Stack Overflow

programmeradmin1浏览0评论

I'm building out a site using fullpage.js, that also has an overlay that pops up and covers the entire page. Inside the overlay, is a div setup with overflow: scroll, so that you can see all of the content. The problem lies in that when you scroll thru the content of the overlay, the scrolling of fullpage.js is still going on the background slides, causing you to end up on a random slide when you close the overlay.

Is there any way to disable the scroll functionality for just the slides, without effecting the scrolling of my div set to overflow:scroll?

I'm building out a site using fullpage.js, that also has an overlay that pops up and covers the entire page. Inside the overlay, is a div setup with overflow: scroll, so that you can see all of the content. The problem lies in that when you scroll thru the content of the overlay, the scrolling of fullpage.js is still going on the background slides, causing you to end up on a random slide when you close the overlay.

Is there any way to disable the scroll functionality for just the slides, without effecting the scrolling of my div set to overflow:scroll?

Share Improve this question asked Sep 10, 2014 at 21:17 TomandhisjonesTomandhisjones 981 silver badge6 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

Using the option normalScrollElements that fullpage.js plugin provides:

From the documentation:

normalScrollElements: (default null) If you want to avoid the auto scroll when scrolling over some elements, this is the option you need to use. (useful for maps, scrolling divs etc.) It requires a string with the jQuery selectors for those elements. (For example: normalScrollElements: '#element1, .element2')

发布评论

评论列表(0)

  1. 暂无评论