我正在尝试 Jquery Menu 小部件,但由于某种原因它无法正常工作。我已经在我的浏览器和 JSFiddle ( http://jsfiddle.net/evanvee/MANH4/2/ ) 上尝试过。
HTML 代码:
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Title</title>
<link rel="stylesheet" href="template.css">
<link rel="stylesheet" href="includes/jquery/themes/base/jquery.ui.all.css">
<script src="includes/jquery/jquery.ui.core.js"></script>
<script src="includes/jquery/jquery-1.9.1.js"></script>
<script src="includes/jquery/jquery.ui.widget.js"></script>
<script src="includes/jquery/jquery.ui.position.js"></script>
<script src="includes/jquery/jquery.ui.menu.js"></script>
<script>
$(function() {
$( "#menu" ).menu();
});
</script>
<style>
.ui-menu { width: 150px; }
</style>
</head>
<body>
<div id="container">
<div id="banner">
<h1>Page Heading</h1>
</div>
<div id="nav">
<ul id="menu">
<li class="ui-state-disabled"><a href="#">Aberdeen</a></li>
<li><a href="#">Ada</a></li>
<li><a href="#">Adamsville</a></li>
<li><a href="#">Addyston</a></li>
<li>
<a href="#">Delphi</a>
<ul>
<li class="ui-state-disabled"><a href="#">Ada</a></li>
<li><a href="#">Saarland</a></li>
<li><a href="#">Salzburg</a></li>
</ul>
</li>
<li><a href="#">Saarland</a></li>
<li>
<a href="#">Salzburg</a>
<ul>
<li>
<a href="#">Delphi</a>
<ul>
<li><a href="#">Ada</a></li>
<li><a href="#">Saarland</a></li>
<li><a href="#">Salzburg</a></li>
</ul>
</li>
<li>
<a href="#">Delphi</a>
<ul>
<li><a href="#">Ada</a></li>
<li><a href="#">Saarland</a></li>
<li><a href="#">Salzburg</a></li>
</ul>
</li>
<li><a href="#">Perch</a></li>
</ul>
</li>
<li class="ui-state-disabled"><a href="#">Amesville</a></li>
</ul>
</div>
<div id="content">
<p><h2>Page heading</h2></p>
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in </p>
</div>
<div id="footer">
Footer stuff here
</div>
</div>
</body>
</html>
出于某种原因,项目符号显示为菜单项,而不是示例中的实际菜单。我正确地错过了一些相当容易的东西,但似乎无法弄清楚问题所在。我根本没有偏离这个例子。此外,我过去从未遇到过任何 JQuery 代码的问题。
任何帮助将不胜感激!