Skip to content

Work with nicescroll

inuyaksa edited this page May 30, 2012 · 8 revisions

How nicescroll object works.

This example it's for new 2.5+ version with nicescrollarray.

How to get nicescroll object

Istance-time

var nice = $("#mydiv").niceScroll();

Request after instanced

var nice = $("#mydiv").getNiceScroll();

Hide a bar

nice.hide();

Hide all the bars (using selector)

$(':nicescroll').hide();

Work with rail (bar content) object (it's a jQuery object)

nice[0].rail.css({'background-color':'#fff'});

Request resize/repositioning (position/size/content changed)

nice.resize();