Suppose that I have the following code:
window.mygs = window.GreenSockGlobals = {};
Modernizr.load( [ { load: [
'TweenLite.js',
'ThrowPropsPlugin.js',
'CSSPlugin.js',
'Draggable.js',
],
complete: function () {
window.GreenSockGlobals = window._gsQueue = window._gsDefine = null; // from TweenLite.js line 67
window.mygs.Draggable(...);
}
} ] );
When I run it, I get this error:
Uncaught TypeError: Cannot read property 'greensock' of undefined Draggable.js:795
What am I doing wrong? Is it possible to load a sandboxed version of GSAP asynchronously? I only need it after the page has loaded, so I'd prefer to load it asynchronously.
Thank you.