jquery.scrollbar
jquery.scrollbar copied to clipboard
OnScroll event firing before initialize
I want to start the scrollbar from bottom and prepending data when user scrolled to top.
{
onInit: function(){
$('.scroll-Element').scrollTop(100000);
},
onScroll: function(y,x){
if(y.scroll==0&&y.maxScroll>0){
// Loading data and prepending
}
}
}
But all data loading when initializing.