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

Diego87 picture Diego87 · Jul 23, 2014 · Viewed 17.9k times · Source

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).

Answer

Gromo picture Gromo · Jul 24, 2014

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.