开发者

.getScript() equivalent in MooTools?

开发者 https://www.devze.com 2023-03-06 23:35 出处:网络
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

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

精彩评论

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