简体   繁体   English

向上滚动时,Stellar.js故障

[英]Stellar.js glitch when scrolling upwards

Please have a look at this website . 请浏览这个网站 The problem here is, that while scrolling downwards, the script works perfectly fine, but when scrolling upwards, the classes of the sidebar navigation do not change immediately, but only on scrolling a pixel or so further in the upwad direction. 这里的问题是,当向下滚动时,脚本可以很好地工作,但是当向上滚动时,侧边栏导航的类不会立即更改,而只是在沿上方向进一步滚动像素左右时才更改。

Please help. 请帮忙。

EDIT: I've even tried changing the default offset in the waypoint js to -1, but doing that resulted in the reverse; 编辑:我什至尝试将航点js中的默认偏移量更改为-1,但这样做的结果相反。 now the same problem occurs during downward scroll. 现在在向下滚动时会出现相同的问题。

EDIT 2: SOLVED : Changed the dimensions and top alignment of the slides which covered the screen. 编辑2:已解决 :更改了覆盖屏幕的幻灯片的尺寸和顶部对齐。 Thank you. 谢谢。

I see you are using Waypoints in order to change the nav menu, the main problem is, the menu are changing when the div are exactly on the top of the page, so you might need to set up the div to trigger on a certain range. 我看到您使用Waypoint来更改导航菜单,主要问题是,当div恰好位于页面顶部时,菜单正在更改,因此您可能需要将div设置为在特定范围内触发。

Hopefully waypoints has the offset parameter to adjust and dampen this common problem. 希望航路点具有offset参数,以调整和缓解此常见问题。

$('.thing').waypoint({
  offset: 250
});

Here's the documentation: http://imakewebthings.com/jquery-waypoints/#doc-options 这是文档: http : //imakewebthings.com/jquery-waypoints/#doc-options

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM