我试过使用google api和我自己的jQuery.js文件,我检查了很多,我的javascript代码似乎很好,所以我猜在将jQuery链接到网页之间很明显我迷路了
<!DOCTYPE html>
<html>
<head>
<title>COMPUTERS.</title>
<link rel="stylesheet" type="text/css" href="cstyle.css">
<script type="text/javascript" src="cscript.js"></script>
</head>
<body>
<div id="navhead" align="center">
<div id="navleft" class="nav">
<p class="valign">Copyright and Patents</p>
</div>
<div id="navcentre" class="nav" align="center">
<p class="valign">Computer Misuse</p>
</div>
<div id="navright" class="nav">
<p class="valign">Data Protection</p>
</div>
</div>
</body>
</html>
Javascript:
$(document).ready(function(){
$(".nav").mouseenter(function(){
$(this).fadeTo("slow", 1);
});
$(".nav").mouseleave(function(){
$(this).fadeTo("slow", 0.5);
});
});