我的 jQuery 手风琴()不能处理我的 HTML 段落。我哪里做错了?
简单的.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div id="mainContent">
<h1>This is an According Example</h1>
</div>
<div id="accordion">
<h3><a href="#">Heading for first sentence</a></h3>
<div>
<p>This is the first sentence.</p>
</div>
<h3><a href="#">Heading for second sentence</a></h3>
<div>
<p>This is the second sentence.</p>
</div>
<h3><a href="#">Heading for third sentence</a></h3>
<div>
<p>This is the third sentence.</p>
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
<script src="myscript.js"></script>
</body>
</html>
myscript.js
window.onload = function(){
$("#accordion").accordion();
};