Closed loeffe1 closed 1 year ago
What do you mean? "event to allow scrolling"?
fakescroll is only visually changes the scrollbar by replacing it with a fake one. it does not affect the scroll in any way. the real scrollbar is just hidden.
This will scroll to the bottom of .my-div but will do nothing on the same element if fakescroll has been initialized on it
$('.my-div').animate({
scrollTop: $('.my-div')[0].scrollHeight - $('.my-div')[0].clientHeight
}, 1000);
I just realized I need to animate .fakeScroll__content
Your code snippet is ancient. This is how things used to work 10+ years ago.
Use this to animate a scroll to the bottom:
$('.my-div')[0].scroll({
top: 9999,
behavior: 'smooth'
});
https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll
https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior
Is there no event to allow scrolling or setting scrollRatio?