in my project, I overlay a lightbox above the scroll content div. but I still can slide the content div over the lightbox. I want to now if has a way to avoid?
Hi!
You can destroy the plugin and set again whenever you want.
Use $("#SomeDiv"). perfectScrollbar('destroy'); when you need to disable it,
and $("#SomeDive").perfectScrollbar(); will enable it again.
Sorry for late response.
Thank you.
Regards.
@noraesae sadly using .perfectScrollbar('destroy'); isn't an option for me, i need to pause all my perfectscrollbars without losing the initialization parameters.
Destroying them and starting them again would require me to know which perfectscrollbars i destroyed and how to initialize them with the correct parameters again which is not an option for me.
I can't seem to find a way to see the parameters used in the initalization of an elements perfectscrollbar either which would be helpful, if i could get those parameters somehow i wouldn't mind destroying perfectScrollbar because i'd save the parameters beforehand for later use.
The best case scenario for me to be able to select all perfectScrollbar elements, save the elements with a certain property(initialization parameter) like 'suppressScrollY: false' in a variable, change 'suppressScrollY' to true, .perfectScrollbar('update') with the new option/paramenter/property do whatever else i need to do, change the 'suppressScrollY' back to what it was and update the perfectScrollbar again.
i'm interested too...
Most helpful comment
Hi!
You can destroy the plugin and set again whenever you want.
Use
$("#SomeDiv"). perfectScrollbar('destroy');when you need to disable it,and
$("#SomeDive").perfectScrollbar();will enable it again.Sorry for late response.
Thank you.
Regards.