Diokuz / baron

Native scroll with custom scrollbar
MIT License
776 stars 124 forks source link

Scroll programmatically #163

Closed qodeboy closed 7 years ago

qodeboy commented 7 years ago

Hello, is it possible to scroll baron programmatically? My use-case involves scrolling baron-enabled block when main page is scrolled.

Diokuz commented 7 years ago

Yes, you can! Just set scroller.scrollTop = x whenever you want to whatever you want position x.

It is actually not the baron, but native scroller property/ability. Baron just reacts on scrollTop change.