Remove/destroy Nicescroll bar from element (integration with JQuery MultiSelect)
Asked Answered
H

1

11

I have added a NiceScroll bar to a div:

$("#div-name").niceScroll();

How can I remove/destroy it?

I have tried the following, but it doesn't work:

$("#div-name").getNiceScroll().stop();

The following is also not a solution:

$("#div-name").getNiceScroll().resize();
$("#div-name").getNiceScroll().hide();

EDIT: I found the problem! When adding NiceScroll to divs that are automatically generated by the JQuery Multiselect plugin, on iPad I have some visualization problems on other NiceScroll divs. So it's probably an issue relating to the integration of the two plugins(NiceScroll and JQuery MultiSelect).

Hak answered 23/7, 2014 at 9:43 Comment(0)
G
23

But this works $("#ID").getNiceScroll().remove();

Try to execute in console on nicescroll demo page: $("#boxscroll2").getNiceScroll().remove() and you'll see that first div This is a simple scrollable DIV will change from nicescroll scrollbars to native browser ones.

Gavan answered 24/7, 2014 at 6:10 Comment(3)
Yes you are right. I will investigate where is the problem, sure it's caused by nicescroll but probably there is one conflict with other plugin or code. For you i must delete the question?Hak
Nope, do not remove it. Maybe someone else will face this problem and will find answer here.Gavan
@Hak like I found, after half hour effort, landed here :)Ruhr

© 2022 - 2024 — McMap. All rights reserved.