aboutsummaryrefslogtreecommitdiffstats
path: root/tests/visual/menu
diff options
context:
space:
mode:
authorkborchers <k_borchers@yahoo.com>2011-09-14 10:29:36 -0500
committerkborchers <k_borchers@yahoo.com>2011-09-14 10:29:36 -0500
commit9e617bbad1df4a2bc8c743b52bced66f31c86a80 (patch)
tree22e9c3b1cb1f5eab21b9ad1ff8d1c3deab8dc6da /tests/visual/menu
parentcedac75bccbfd8eb2b0301fd40fc31a36a9296b1 (diff)
downloadjquery-ui-9e617bbad1df4a2bc8c743b52bced66f31c86a80.tar.gz
jquery-ui-9e617bbad1df4a2bc8c743b52bced66f31c86a80.zip
Menu: Add support for structures other than UL/LI plus visual and unit tests
Diffstat (limited to 'tests/visual/menu')
-rw-r--r--tests/visual/menu/menu.html102
1 files changed, 100 insertions, 2 deletions
diff --git a/tests/visual/menu/menu.html b/tests/visual/menu/menu.html
index 195488184..06e34cbdd 100644
--- a/tests/visual/menu/menu.html
+++ b/tests/visual/menu/menu.html
@@ -23,8 +23,22 @@
$("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
}
});
- }
+ $("#menu5").menu({
+ select: function(event, ui) {
+ $("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
+ },
+ items: "div"
+ });
+
+ $("#menu6").menu({
+ select: function(event, ui) {
+ $("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
+ },
+ items: ".menuElement"
+ });
+ }
+
var menus = $("#menu1, #menu2, #menu3, .menu4");
create();
@@ -42,6 +56,9 @@
body { font-size:62.5%; }
.ui-menu { width: 200px; margin-bottom: 2em; }
.menu4 { height: 200px; overflow: auto; }
+ .address-item { border-bottom: 1px solid #999; }
+ .address-header { display: block; margin-bottom: .2em; font-weight: bold; }
+ .address-content { display: block; margin-bottom: .2em; padding-left: 10px; }
</style>
</head>
<body>
@@ -173,6 +190,87 @@
<li><a href="#">Amesville</a></li>
</ul>
+<div id="menu5">
+ <blockquote><a href="#">Aberdeen</a></blockquote>
+ <blockquote><a href="#">Ada</a></blockquote>
+ <blockquote><a href="#">Adamsville</a></blockquote>
+ <blockquote><a href="#">Addyston</a></blockquote>
+ <blockquote>
+ <a href="#">Delphi</a>
+ <div>
+ <blockquote><a href="#">Ada</a></blockquote>
+ <blockquote><a href="#">Saarland</a></blockquote>
+ <blockquote><a href="#">Salzburg</a></blockquote>
+ </div>
+ </blockquote>
+ <blockquote><a href="#">Saarland</a></blockquote>
+ <blockquote>
+ <a href="#">Salzburg</a>
+ <div>
+ <blockquote>
+ <a href="#">Delphi</a>
+ <div>
+ <blockquote><a href="#">Ada</a></blockquote>
+ <blockquote><a href="#">Saarland</a></blockquote>
+ <blockquote><a href="#">Salzburg</a></blockquote>
+ </div>
+ </blockquote>
+ <blockquote>
+ <a href="#">Delphi</a>
+ <div>
+ <blockquote><a href="#">Ada</a></blockquote>
+ <blockquote><a href="#">Saarland</a></blockquote>
+ <blockquote><a href="#">Salzburg</a></blockquote>
+ </div>
+ </blockquote>
+ <blockquote><a href="#">Perch</a></blockquote>
+ </div>
+ </blockquote>
+</div>
+
+<div class="menuElement" id="menu6">
+ <div class="address-item">
+ <a href="#">
+ <span class="address-header">John Doe</span>
+ <span class="address-content">78 West Main St Apt 3A</span>
+ <span class="address-content">Bloomsburg, PA 12345</span>
+ </a>
+ </div>
+ <div class="address-item">
+ <a href="#">
+ <span class="address-header">Jane Doe</span>
+ <span class="address-content">78 West Main St Apt 3A</span>
+ <span class="address-content">Bloomsburg, PA 12345</span>
+ </a>
+ </div>
+ <div class="address-item">
+ <a href="#">
+ <span class="address-header">James Doe</span>
+ <span class="address-content">78 West Main St Apt 3A</span>
+ <span class="address-content">Bloomsburg, PA 12345</span>
+ </a>
+ </div>
+ <div class="address-item">
+ <a href="#">
+ <span class="address-header">Jenny Doe</span>
+ <span class="address-content">78 West Main St Apt 3A</span>
+ <span class="address-content">Bloomsburg, PA 12345</span>
+ </a>
+ </div>
+ <div class="address-item">
+ <a href="#">
+ <span class="address-header">John Doe</span>
+ <span class="address-content">78 West Main St Apt 3A</span>
+ <span class="address-content">Bloomsburg, PA 12345</span>
+ </a>
+ <div class="menuElement">
+ <div><a href="#">Ada</a></div>
+ <div><a href="#">Saarland</a></div>
+ <div><a href="#">Salzburg</a></div>
+ </div>
+ </div>
+</div>
+
<div class="ui-widget" style="clear: left; margin-top:2em; font-family:Arial">
Log:
<div id="log" style="height: 400px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
@@ -182,4 +280,4 @@
<button id="toggle-destroy">Destroy / Create</button>
</body>
-</html>
+</html> \ No newline at end of file