<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="../scripts/jquery-2.1.4.js"></script>
<script>
$(document).ready(function({
$("#panel h5.head").bind('click', function() {
$(this).next().show();
})
})
</script>
<style>
.head {border: 1px solid black; background: pink; width:150px; height: 40px; line-height: 40px; text-align: center;}
.content { display: none;}
</style>
</head>
<body>
<div id="panel">
<h5 class="head">什么是jQuery</h5>
<div class="content">
jQuery是继Prototype之后有一个优秀的JS库jQuery是继Prototype之后有一个优秀的JS库jQuery是继Prototype之后有一个优秀的JS库jQuery是继Prototype之后有一个优秀的JS库jQuery是继Prototype之后有一个优秀的JS库
</div>
</div>
</body>
</html>
$("#panel h5.head").bind('click', function() {
这行报错:Uncaught SyntaxError: Unexpected string
跟书上一样的啊,为啥要报错。。。
ready 的 function 少 右括号