Leaderboard


Popular Content

Showing content with the highest reputation on 12/28/2017 in all areas

  1. 6 points
    I think I see what the problem is - GSAP doesn't natively interpolate "vw" or "vh" units (though it likely will when 2.0.0 is released, but that won't be for a few months most likely). It can set() them directly, but interpolating is different. In this case, the inbetween values are converted to px. So here's a solution that gives you the same result but just does the conversion for you at the right time: Is that what you're after?
  2. 4 points
    Hi @hemmoleg Welcome to the forum. I see you're using TweenLite so perhaps you didn't load the EasePack? Another thing to check is if you've put the ease in the correct place in your tween vars? Here's a simple pen with a few different eases. My pen loads TweenMax which also loads the EasePack, but if you're loading TweenLite only, you need to load the EasePack too. TweenMax loads: TweenLite TweenMax TimelineLite TimelineMax CSSPlugin AttrPlugin RoundPropsPlugin DirectionalRotationPlugin BezierPlugin EasePack If you have other questions, a demo is most helpful in getting you the best answers. Hopefully that helps. Happy tweening.
  3. 2 points
    Hi @Johny13 Are you sure the element you're targeting is actually scrollable? You can get the current scroll position of an element like this: var body = document.querySelector('body'); console.log(body.scrollTop); I tried adding a div parent with 'overflow:scroll' and set it as the scroll container in the tween, and it worked just fine as far as I could tell. Edit: In Codepen it's the parent element of the body that gets the scrollbars.
  4. 2 points
    I think you need to use 'scrollTo' with scrollTo plugin, and probably on window rather than body. Does your code work in other browsers? .to(window, 1, { scrollTo: 0, autoKill:false })
  5. 1 point
    Ahhh yes, that makes a lot of sense. Very good to know, I don't think I would have come to understand that limitation anytime soon. Thank you greatly for your help, that is exactly the functionality I was trying to accomplish. Happy New Year!
  6. 1 point
    Can you post a codepen demo? It will be hard to guess without demo.
  7. 1 point
    Hey everyone! So I realize this thread is really old, but I was messing around with Blake's implementation of the jQuery / TweenLite animation toggle last night and ended up rewriting it in vanilla JS in case anyone's interested in using that instead of jQuery for whatever reason:
  • Newsletter

    Want to keep up to date with all our latest news and information?

    Sign Up