Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mCustomScrollbar get scroll position

Iam using mCustomScrollbar , I want to know whether my scroll bar position is at bottom using jquery.How is that possible?Can i use ordinary bottom check usage in jquery or any functions are available in the mCustomScrollbar library?

like image 309
freakydev Avatar asked Jun 02 '26 18:06

freakydev


1 Answers

Look at callbacks example - there is Scroll percentage that displays % of scrolled. Open HTML source and you will see that it's uses whileScrolling callback: $("#mcs-top-pct").text(this.mcs.topPct+"%");, so when this.mcs.topPct is 100, then container is scrolled to bottom :)

like image 138
Gromo Avatar answered Jun 05 '26 13:06

Gromo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!