| 1 |
<!doctype html> |
| 2 |
<html lang="en"> |
| 3 |
<head> |
| 4 |
<meta charset="utf-8"> |
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 |
<title>jQuery UI Menu - Categories</title> |
| 7 |
<link rel="stylesheet" href="../../themes/base/all.css"> |
| 8 |
<link rel="stylesheet" href="../demos.css"> |
| 9 |
<script src="../../external/requirejs/require.js"></script> |
| 10 |
<script src="../bootstrap.js"> |
| 11 |
$( "#menu" ).menu({ |
| 12 |
items: "> :not(.ui-widget-header)" |
| 13 |
}); |
| 14 |
</script> |
| 15 |
<style> |
| 16 |
.ui-menu { width: 200px; } |
| 17 |
.ui-widget-header { padding: 0.2em; } |
| 18 |
</style> |
| 19 |
</head> |
| 20 |
<body> |
| 21 |
|
| 22 |
<ul id="menu"> |
| 23 |
<li class="ui-widget-header"><div>Category 1</div></li> |
| 24 |
<li><div>Option 1</div></li> |
| 25 |
<li><div>Option 2</div></li> |
| 26 |
<li><div>Option 3</div></li> |
| 27 |
<li class="ui-widget-header"><div>Category 2</div></li> |
| 28 |
<li><div>Option 4</div></li> |
| 29 |
<li><div>Option 5</div></li> |
| 30 |
<li><div>Option 6</div></li> |
| 31 |
</ul> |
| 32 |
|
| 33 |
<div class="demo-description"> |
| 34 |
<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> |
| 35 |
</div> |
| 36 |
</body> |
| 37 |
</html> |