I am using Jquery nice Scroll bar for div, but when content of div increases dynamically its not showing scroll bar. Windows default scroll bar works fine if i remove nice scroll. Can anyone help me to solve this problem?
Html
<div id="div-to-scroll">
</div>
Script
$(document).ready(function(e) {
var nice = $("#div-to-scroll").getNiceScroll();
$("#div-to-scroll").niceScroll();
$("#div-to-scroll").getNiceScroll().resize();
});
this is my code sample.
Some possible reasons:
1- Maybe you forgot to specify your div height. fix your div Height.
2- also if your div is float in width fix that width too.
Remmember that your DIV STYLE should have:
overflow-y: hidden;
UPDATE
try using resize() function every time you scroll down:
for me works just with
Do this:
or:
Note
[0]
aftergetNiceScroll()
To get the scroll bar on full body
Finally this works for me.
UPDATE: new function found!
Call this function to Update niceScroll