JQuery Nicescroll event binding. What events are available?

I use Nicescroll and want to bind to the scroll event of the div on which the nicescroll-plugin is defined.

Sort of:

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

However, the above does not work. What event (possibly a custom event defined by nicescroll) can I bind to what is fired when scrolling? I can't seem to find anything in the docs.

thanks

+4
source share
1 answer

You can use only custom event:

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

Source: https://habr.com/ru/post/1442743/


All Articles