I have 4 js files I want to load from a single file.
in my footer I have the following link
<script src="content/vendor/js/utils.js"></script>
utils.js is the main file.
the files I want to load are in content/vendor/js/gsap
I have the following code in my utilities file but it does not seem to load the files because the effects stop working.
// JavaScript Document
=== all.js ===
(function() {
'use strict';
var a = [
'TweenMax.min',
'ScrollMagic',
'animation.gsap',
'jquery.placeholder',
...
];
var i;
var s = [];
for (i = 0; i < a.length; i += 1) {
s = s.concat(['<script src="/gsap/', a[i], '.js"></script>']);
}
document.write(s.join(''));
}());