Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

计算器demo跑不起来 #180

Closed
jonnywang opened this Issue Mar 28, 2012 · 2 comments

Comments

Projects
None yet
2 participants

修改了init.js

seajs.config({
alias: {
'jquery': 'http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js'
},
debug:true
});

打开页面是提示 $ is not a function

显然是jquery没有成功引入,查看firebug是有请求到http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js,
调试使用sea-debug.js

发现走到
else if (util.isString(id)) {
uri = RP.resolve(id, context);
mod = data.memoizedMods[uri];
}

mod为null,

请教如何解决

Owner

lifesinger commented Apr 9, 2012

Hi, Jonny Wang:

使用 SeaJS 加载 JS 文件时,需要 JS 文件是符合 SeaJS 支持的模块规范的文件。对于 jQuery,封装好的文件可以在这里下载:

https://github.com/seajs/modules/tree/gh-pages/jquery

或者直接引用:

seajs.config({
  alias: {
    'jquery': 'http://modules.seajs.org/jquery/1.7.2/jquery.js'
  }
});

@lifesinger lifesinger closed this Apr 9, 2012

感谢

在 2012年4月9日 下午4:50,lifesinger <
reply@reply.github.com

写道:

Hi, Jonny Wang:

使用 SeaJS 加载 JS 文件时,需要 JS 文件是符合 SeaJS 支持的模块规范的文件。对于 jQuery,封装好的文件可以在这里下载:

https://github.com/seajs/modules/tree/gh-pages/jquery

或者直接引用:

seajs.config({
 alias: {
   'jquery': 'http://modules.seajs.org/jquery/1.7.2/jquery.js'
 }
});

Reply to this email directly or view it on GitHub:
#180 (comment)

mail:ixqbar@gmail.com
phone:13671527966
blog:http://xingqiba.sinaapp.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment