在这里就不介绍 seajs 是啥了,直接来说说在 seajs 中使用jquery 和 jquery 插件遇到的问题:

首先:【index.html 为展示页】【main.js为主体页 】【 jquery.js 为jquery库】【plugins.js为jquery插件】,它们各自是一个页面

index.html

seajs.config({
    base:'./static/js/',
    alias:{
        'main':'main'
    }
});
//引用主体js
seajs.use('main');
View Code

相关文章: