Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 457
Diego87 Avatar asked Jul 23 '14 09:07

Diego87


1 Answers

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.

like image 123
Gromo Avatar answered Oct 21 '22 07:10

Gromo