aboutsummaryrefslogtreecommitdiffstats
path: root/demos/menu/categories.html
blob: c0e55d05a168f04a6455ea03f520f054f4616dde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!doctype html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>jQuery UI Menu - Categories</title>
	<link rel="stylesheet" href="../../themes/base/all.css">
	<script src="../../external/jquery/jquery.js"></script>
	<script src="../../ui/core.js"></script>
	<script src="../../ui/widget.js"></script>
	<script src="../../ui/position.js"></script>
	<script src="../../ui/menu.js"></script>
	<link rel="stylesheet" href="../demos.css">
	<script>
	$(function() {
		$( "#menu" ).menu({
			items: "> :not(.ui-widget-header)"
		});
	});
	</script>
	<style>
	.ui-menu { width: 200px; }
	.ui-widget-header { padding: 0.2em; }
	</style>
</head>
<body>

<ul id="menu">
	<li class="ui-widget-header">Category 1</li>
	<li>Option 1</li>
	<li>Option 2</li>
	<li>Option 3</li>
	<li class="ui-widget-header">Category 2</li>    
	<li>Option 4</li>
	<li>Option 5</li>
	<li>Option 6</li>
</ul>

<div class="demo-description">
<p>By using the <code>items</code> option, you can configure which elements are converted into selectable menu items. Here this technique is used to create category headers.</p>
</div>
</body>
</html>