I'm using the following code to automatically scroll a div up & down when the user has not been interacting for a while (idle).
objListingScrollTween = gsap.timeline({ repeat: -1, repeatDelay: 1, yoyo: true });
objListingScrollTween.add(gsap.to("#sessionListingsHolder", { duration: 5, scrollTo: { y: "max" }, ease: "none"}));
This works fine but I have two questions:
1) is there an inbuilt way of getting the value of "max" ?
2) when the user interacts, I pause the timeline. When idle resumes I call resume() on the timeline. But the user may have scrolled manually to a different scroll position in which case there is a jump. Is there an inbuilt way to get the value the timeline needs to seek() to in order to restart the timeline from the correct place?
thanks