javascript - 当滚动在两个部分的中间结束时,如何禁用 fullPage.js 的自动重新对齐行为?

标签 javascript jquery css twitter-bootstrap fullpage.js

我不知道这样的问题最好的描述是什么来寻找答案。 在我看来它像 fullPage.js有一些内置触发器,允许它自动重新调整以对齐部分,同时滚动在两个部分之间的中间部分结束。

在正常滚动模式下,默认情况下这种行为仍然存在,当用户只想精确向下滚动以查看更多文本或希望页面滚动到所需位置时,这会非常烦人。

普通滚动条模式 url: http://alvarotrigo.com/fullPage/examples/normalScroll.html (在 iPAD 等设备上测试时,当滚动在分界线之间结束时,将触发自动对齐。在桌面 chrome 或 safari 浏览器中,此问题不明显或根本不会触发。)

我检查了 fullPage.js 中的 resizeHandler

//when resizing the site, we adjust the heights of the sections, slimScroll...
$(window).resize(resizeHandler); 

但它似乎不是滚动重新调整功能的确切触发器。

我想禁用自动对齐,因为当用户在两个部分的边缘附近滚动屏幕时,它会与正常的滚动行为发生冲突。

最佳答案

下载最新版的fullPage.js(2.4.7),相信已经解决了,很详细in this issue .

It is happening because the address bar in the top changes its size when scrolling up or down and the resize event is fired, causing the plugin to try to readjust and fit the sections in the screen. (as you can see in the demo page by resizing the window)

It seems iOS 8 was not acting in the same way, it was probably not firing the resize event.

关于javascript - 当滚动在两个部分的中间结束时,如何禁用 fullPage.js 的自动重新对齐行为?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27037723/

相关文章:

javascript - Prism.js 不显示标记

jquery - Paypal 按钮定制 Bootstrap 喜欢

css - 猫头鹰轮播中的图像大小问题

JavaScript Jasmine 单元测试覆盖率

Javascript:按三个值对对象数组进行排序

javascript - jquery slider 的 css 边距问题

html - 不会破坏文本对齐的最薄的 HTML 实体

css - ionic - 在 iOS 10 的输入字段中复制/粘贴不起作用

javascript - 点击事件回调

javascript - 事件处理程序应该是方法中的最后一个语句吗?