gpt4 book ai didi

jquery - 使用 jQuery Waypoints Sticky Shortcut 时如何触发回调?

转载 作者:行者123 更新时间:2023-12-03 23:03:43 26 4
gpt4 key购买 nike

每当 waypoint('sticky') 更改导航栏的类时,我想切换另一个元素的类。我试图使用 handler 选项触发回调,但它不起作用。我能做什么?

最佳答案

由于某种原因,Waypoints 的回调选项是“处理程序”,因此您可以这样做:

$.waypoint('sticky', {
handler: function(dir) {
//Do stuff when the user scrolls past this waypoint.
}
});

关于jquery - 使用 jQuery Waypoints Sticky Shortcut 时如何触发回调?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14363988/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com