inuyaksa / jquery.nicescroll

nicescroll plugin for jquery - scrollbars like iphone/ipad
https://nicescroll.areaaperta.com/
3.6k stars 1.67k forks source link

Cant figure out how to enable and disable an instance. #685

Open RickKukiela opened 7 years ago

RickKukiela commented 7 years ago

I have a menu that opens where I need to lock body scrolling when its open. I cannot figure out how to do this completely. I did figure out I can set niceInstance.locked = true; and niceInstance.locked = false; to enable and disable the mouse wheel scrolling which is good enough... However it bugs me that you can still hover the mouse over the "scroll bar area" and it pops up, and then you can still click and drag the scrolling even though the instance is set to locked.

I did not see a method that is designed to enable and disable the functionality. Am I missing something or is this a feature request?

inuyaksa commented 7 years ago

Hi, still a feature request.

You can use .hide / . show functions.

$("#yourdiv").getNiceScroll().hide();