Q: ScrollMagic and GSAP on mobile only You can see from my codepen that I have a logo on my website that fades out as you scroll down the page, which is triggered after a certain trigger has been fired. This is working the way I want it, except I only want this to fire on mobile browsers and mobile screen sizes.
I'm using scrollmagic.js with this also.
Does anyone know how to set this up so the effect will only work on mobile and screen sizes < 768px.
I'm fairly new to JS and so would appreciate baby steps.
thanks
// When the DOM is ready
$(window).on('load', function() {

  // Init ScrollMagic Controller
  var scrollMagicController = new ScrollMagic();

  // Create Animation for 0.5s
  var tween = TweenMax.to('#animation', 0.5, {
    opacity: 0  
  });

  // Create the Scene and trigger when visible
  var scene = new ScrollScene({
    triggerElement: '.scene',
    offset: 150 /* offset the trigger 150px below #scene's top */  
  })
  .setTween(tween)
  .addTo(scrollMagicController);

  // Add debug indicators fixed on right side
   scene.addIndicators();

});

Codepen of what I currently have 

A: I would wrap the scrollMagic block on an if statement that checks if it is a touch device or if it has a minimum with, depending on which behaviour you are interested in.
With Modernzr:
var agent = navigator.userAgent.toLowerCase();

var onlyTaps = Modernizr.touch || 
(agent.match(/(iphone|ipod|ipad)/) ||
agent.match(/(android)/)  || 
agent.match(/(iemobile)/) || 
agent.match(/iphone/i) || 
agent.match(/ipad/i) || 
agent.match(/ipod/i) || 
agent.match(/blackberry/i) || 
agent.match(/bada/i));

if (onlyTaps) {
        //magicScroll block here
    } else {
        //something else here
    }

Now, if you are only interested on the device width then you can use screen.width:
if (screen.width < 480) {
        //magicScroll block here
    } else {
        //something else here
    }

The only caveat is that screen.width might return real pixels or not on some high density devices.  It works as expected on iPhones and Macbook Pro w/retina displays.
