Making nanoScroller taking full height in its container div

1.5k views Asked by At

I use nanoScroller to display content inside some divs.

But these divs can take different heights, e.g. if the user resizes its window or delete something from div.

I'd like to make nanoScroller take automatically the full remaining height inside its container.

Any idea on how to achieve that ?

1

There are 1 answers

0
Behnam On BEST ANSWER

you can reinit nanoScroller when browser resize reinit event use in window onresize event for example

$(window).resize(function(){
    $(".content").nanoScroller({ destroy: true }); //for destroy nano
    $(".content").nanoScroller(); //for init nanoScroller (reinit)
});