mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-12-07 06:14:24 +00:00
75 lines
2.0 KiB
HTML
75 lines
2.0 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>jQuery UI Menu - Navigation Menu</title>
|
|
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
|
<script src="../../jquery-1.8.2.js"></script>
|
|
<script src="../../ui/jquery.ui.core.js"></script>
|
|
<script src="../../ui/jquery.ui.widget.js"></script>
|
|
<script src="../../ui/jquery.ui.position.js"></script>
|
|
<script src="../../ui/jquery.ui.menu.js"></script>
|
|
<link rel="stylesheet" href="../demos.css">
|
|
<script>
|
|
$(function() {
|
|
$( "#menu" ).menu({
|
|
select: function( event, ui ) {
|
|
var link = ui.item.children( "a:first" );
|
|
if ( link.attr( "target" ) || event.metaKey || event.shiftKey || event.ctrlKey ) {
|
|
return;
|
|
}
|
|
location.href = link.attr( "href" );
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
<style>
|
|
.ui-menu { width: 200px; margin-bottom: 2em; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<ul id="menu">
|
|
<li><a href="?Aberdeen">Aberdeen</a></li>
|
|
<li><a href="?Ada">Ada</a></li>
|
|
<li><a href="?Adamsville">Adamsville</a></li>
|
|
<li><a href="?Addyston">Addyston</a></li>
|
|
<li>
|
|
<a href="?Delphi">Delphi</a>
|
|
<ul>
|
|
<li><a href="?Ada">Ada</a></li>
|
|
<li><a href="?Saarland">Saarland</a></li>
|
|
<li><a href="?Salzburg">Salzburg</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="?Saarland">Saarland</a></li>
|
|
<li>
|
|
<a href="?Salzburg">Salzburg</a>
|
|
<ul>
|
|
<li>
|
|
<a href="?Delphi">Delphi</a>
|
|
<ul>
|
|
<li><a href="?Ada">Ada</a></li>
|
|
<li><a href="?Saarland">Saarland</a></li>
|
|
<li><a href="?Salzburg">Salzburg</a></li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<a href="?Delphi">Delphi</a>
|
|
<ul>
|
|
<li><a href="?Ada">Ada</a></li>
|
|
<li><a href="?Saarland">Saarland</a></li>
|
|
<li><a href="?Salzburg">Salzburg</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="?Perch">Perch</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="demo-description">
|
|
<p>A navigation menu. A list is transformed, adding theming, mouse and keyboard navigation support. Try to tab to the menu then use the cursor keys to navigate.</p>
|
|
</div>
|
|
</body>
|
|
</html>
|