.getScript () in MooTools?

I was wondering if there is a MooTools equivalent for jQuery .getScript()? I am pretty sure this exists somewhere in MooTools, but I have not been able to find it yet.

+3
source share
1 answer

I am not familiar with MooTools, but it looks like you can use Asset.javascript.

var myScript = Asset.javascript('/scripts/myScript.js', {
    id: 'myScript',
    onLoad: function(){
        alert('myScript.js is loaded!');
    }
});
+8
source

All Articles