2014-09-19 19:12:35 +00:00
<!doctype html>
< html lang = "en" >
< head >
< meta charset = "utf-8" >
2015-09-30 13:11:22 +00:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
2014-09-19 19:12:35 +00:00
< title > jQuery UI Menu - Categories< / title >
< link rel = "stylesheet" href = "../../themes/base/all.css" >
< link rel = "stylesheet" href = "../demos.css" >
2015-06-30 23:01:30 +00:00
< script src = "../../external/requirejs/require.js" > < / script >
< script src = "../bootstrap.js" >
2014-09-19 19:12:35 +00:00
$( "#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" >
2014-10-25 16:18:17 +00:00
< li class = "ui-widget-header" > < div > Category 1< / div > < / li >
< li > < div > Option 1< / div > < / li >
< li > < div > Option 2< / div > < / li >
< li > < div > Option 3< / div > < / li >
2015-09-30 13:11:22 +00:00
< li class = "ui-widget-header" > < div > Category 2< / div > < / li >
2014-10-25 16:18:17 +00:00
< li > < div > Option 4< / div > < / li >
< li > < div > Option 5< / div > < / li >
< li > < div > Option 6< / div > < / li >
2014-09-19 19:12:35 +00:00
< / 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 >