.getScript() equivalent in MooTools?
I was wondering if there is a MooTools equivalent to jQuery's .getScript()
? I'm pretty certain that this exists somewhere in MooTools but I haven't been开发者_开发问答 able to find it yet.
I'm not that 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!');
}
});
精彩评论