Closed coisox closed 6 years ago
@coisox sorry for the late answer, Simplebar is not a "jQuery plugin" anymore since version 2. So this won't work at all the way you wrote. I believe you were referring to the documentation of the version1.
Try this:
var simplebar = new Simplebar($('.x_content')[0]);
TweenLite.to(simplebar.getScrollElement(), 0.5, {scrollTo:{y:100}, ease:Power2.easeOut});
Hi, kindly help. I want to scroll to anchor. Without simplebar, no problem. So I refer to your sample at https://github.com/Grsmto/simplebar/blob/master/demo/stress-test.html but no luck.
I'm using SimpleBar.js - v2.5.1
Here's my HTML:
To test the scrolling, I've run all these variation in browser's console:
TweenLite.to($('.x_content'), 0.5, {scrollTo:{y:100}, ease:Power2.easeOut});
No error nothing happen:TweenLite.to($('.x_content')[0], 0.5, {scrollTo:{y:100}, ease:Power2.easeOut});
No error nothing happen:$(...).simplebar is not a function
$(...)[0].simplebar is not a function