开发者

.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!');
    }
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜