Jump to content
GreenSock

sxp6200

Members
  • Posts

    3
  • Joined

  • Last visited

Reputation

1 Newbie
  1. Thanks Rodrigo. For some reason I was under the impression that if you use something like x:"14%" GSAP uses JS instead of CSS to perform the tween.
  2. Hey guys, I actually discovered an easier way to do this using enquire.js Here's an example: enquire.register("screen and (max-width:1023px)", { match: function() { isMobile = true; console.log("is mobile"); }, unmatch: function() { isMobile = false; console.log("is desktop"); } }); if(!isMobile) { //slide in #main TweenMax.fromTo('#main', 1.25, {opacity: 0, transform:"translateX(14%)"}, {opacity: 1, transform:"translateX(0%)", delay:0.5, ease:Expo.easeOut} ); //fadeout overlay TweenMax.fromTo('#overlay', 1, {autoAlpha: 1}, {autoAlpha: 0, delay:0.6} ); } else { //fadeout overlay TweenMax.fromTo('#overlay', 0, {autoAlpha: 1}, {autoAlpha: 0, delay:0} ); }
  3. Hi Everybody, Can you share your approaches for conditionally disabling tweenlite/tweenmax tweens? For example, I have some divs sliding in from the left on a desktop site, but for a width less than 720px i'd like to disable the animation. Any example code, ideas would be very helpful. Thanks!
×