yairEO / fakescroll

vanilla-js lightweight custom HTML scrollbar
http://yaireo.github.io/fakescroll
GNU Affero General Public License v3.0
365 stars 33 forks source link

Is there a way to trigger a bar styling update? #18

Closed ataylor32 closed 4 years ago

ataylor32 commented 4 years ago

I have a div that I'm using fakescroll on. If I replace the content of that div, the bar's height, which indicates how much content there is, remains the same until I hover over the div. Is there something I can do to tell fakescroll to update the bar's height?

yairEO commented 4 years ago

Try

fakescroll.moveBar()

https://github.com/yairEO/fakescroll/blob/master/fakescroll.js#L174

ataylor32 commented 4 years ago

That worked! Thanks!