+
95
-

回答

这是由于jquery不支持cmd加载方式导致的错误。

jquery1.7以上默认的是支持amd加载,不支持cmd加载。只需要稍微改下jquery,就可以让jquery支持seajs的加载。


if (typeof define === "function" && (define.amd)) {
define( "jquery", [], function() {
return jQuery;
});
}

改成
if (typeof define === "function" && (define.amd || define.cmd)) {
define( "jquery", [], function() {
return jQuery;
});
}


if (typeof define === "function") {
define( "jquery", [], function() {
return jQuery;
});
}


网友回复

我知道答案,我要回答