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.
Finally this works for me.
$("#div-to-scroll").scroll(function(){
$("#div-to-scroll").getNiceScroll().resize();
});
for me works just with
$("#div-to-scroll").mouseover(function() {
$("#div-to-scroll").getNiceScroll().resize();
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With