Jump to content


  • Posts

  • Joined

  • Last visited

Iskren's Achievements



  1. I try using CDN,requirejs & TimelineMax here is the js code require.config({ //enforceDefine: true, //for errors in IE baseUrl: 'support/Animation/src/minified', paths: { jquery: [ 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min', 'http://code.jquery.com/jquery-1.11.0.min', //'jquery.min', ], timelinemax: [ "http://cdnjs.cloudflare.com/ajax/libs/gsap/1.11.3/TimelineMax.min", ], }, shim: { jquery: {exports: '$'}, timelinemax: { exports: 'TimelineMax',}, } }); define(['jquery', 'timelinemax'], function ($, TM) { if (TM !== undefined) { $("#a").text("OK fine"); } else { $("#a").text("smth wrong with the shim"); } }); here is the html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script data-main="scripts/try" src="scripts/require.js" defer></script> </head> <body> <div id="a"></div> </body> </html> and the result is that "smth wrong with the shim" when I call the TM it doesnt do the job or thows exception. THe only way I could get work was to add the tag in the html: <script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.11.5/TweenMax.min.js" defer></script> The thing is that requirejs says that there is no define() call ... the GSAP lib uses windows._gsDefine() wich is different from the requirejs probably. please inform me when that is fixed.