同样的代码在我的计算机上不能运行

因为项目要求在学jQuery,做了个helloWorld的例子,在同事的机器上没有任何问题,在我的机器上就是不行。代码如下
custom.js:
$(document).ready.(function(){
$("#first").click(function(){
alert("Hello world !");
});
});
starterkit.html :




jQuery Starterkit


jQuery Starterkit

This page contains code to test the examples. Most of it is only relevant for a example.

Some link

Go to top



[b]问题补充:[/b]
昨天着急问题写的不够详细,我用的xp3的系统浏览器是ie7后来下了个ff3.5也试了,还是不行。二楼的仁兄,你说的方法我已经试过了

晕,你代码写错了
多了一个“.”

  $(document).ready[color=red].[/color](function(){ 
 $("#first").click(function(){ 
 alert("Hello world !"); 

});
});

修改下就行了

  $(document).ready(function(){ 
 $("#first").click(function(){ 
 alert("Hello world !"); 

});
});

把href="#"去掉应该就没问题了