Jump to content
GreenSock

jezmck

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by jezmck

  1. When I have two tweens which I want to run concurrently, I've been taking the following approach (concatting a string for the `position`), but feel there must be a better way.

    var tl = new TimelineLite({ paused: true });
    var $box = jQuery(".box");
    var duration = 2;
    
    tl.add(TweenLite.to($box, duration, {
      ease: 'Bounce.easeOut',
      width: 100
    }));
    
    tl.add(TweenLite.to($box, duration, {
      // don't want bounce-ease on this property
      height: 300
    }), '-=' + duration);
    

    Any suggestions very welcome!

    See the Pen bpYVpv by jezmck (@jezmck) on CodePen

×