gpt4 book ai didi

jquery - 绑定(bind)到 Jquery Nicescroll 事件。有哪些事件可以参加?

转载 作者:行者123 更新时间:2023-11-30 23:57:42 25 4
gpt4 key购买 nike

我正在使用Nicescroll并希望绑定(bind)到定义了 NiceScroll-plugin 的 div 的滚动事件。

类似:

$("#sec_menu").niceScroll();  
$("#sec_menu").scroll(function(e){ //do stuff here });

但是上面的方法不起作用。我可以绑定(bind)哪个事件(可能是由 NiceScroll 定义的自定义事件)并在滚动时触发?我似乎在文档中找不到任何内容。

谢谢

最佳答案

您只能使用自定义事件:

  $("#id").niceScroll().scrollstart(function(info){
//do something here
})
// or
$("#id").niceScroll().scrollend(function(info){
//do something here
})

关于jquery - 绑定(bind)到 Jquery Nicescroll 事件。有哪些事件可以参加?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13122065/

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