Jump to content
Search Community

vicmortelmans

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by vicmortelmans

  1. Hi Sahil, thanks! That's a very reasonable solution for my scenario! Best regards, Vic
  2. Hi, I've put together another demo where it seems to go wrong. I'm now using the element id for the scrollTo target. Note that it only goes wrong when the disappearing element is *before* the element that must be scrolled to. I hope you can reproduce this behaviour? best regards, Vic
  3. Hi, thanks for the fast feedback! I've tried to make a demo, but for some reason the scrollTo animation isn't doing anything in CodePen. I suspected the 'window' element to be the problem, but I replaced it by a wrapper div with fixed height without success... Still maybe it will better illustrate the purpose: Best regards, Vic
  4. 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 *before* the element's height is reduced to 0, but somehow the proper position is never reached. I have also tried to provide the scrolling animation with the id of the element that should align to the top of the screen, that doesn't work either. When I delay the second animation until the first has finished, it is working. How can both animations be achieve simultaneously? Here's the code for my two animations (with the delay in the second animation, which I want to avoid): TweenLite.to(contentToHide,1,{height:0}); // animation 1 TweenLite.to(window,1,{delay: 1, scrollTo:Math.max(0, scrollReference + scrollCorrection)}); // animation 2 Best regards, Vic
×
×
  • Create New...