Hi,
I have two animations that should run simultaneously:
reducing an element's height to 0
scrolling to a certain position, to align a certain element to the top of the screen. Note that this element is *after* the element in animation 1
I've calculated the target position for scrolling based on the document *after* the first element's height is reduced to 0, and I also tried the animation with target position for scrolling based on the document *bef
Well problem is that when you animate element above target and reduce height, it offsets scrollTo's target location. So assuming you don't really need to do animation as it is not visible anyway, you can use following method so you won't see any jumps.
See the Pen ZvKbJX?editors=0010 by Sahil89 (@Sahil89) on CodePen
Otherwise you will just have to constantly update target using onUpdate callback so you won't see any jumps, but still it will