aboutsummaryrefslogtreecommitdiffstats
path: root/demos/menubar
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2011-06-09 17:14:21 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2011-06-09 17:14:21 +0200
commit7281f9f22904d97b3d244a1c8ed2450e6506d538 (patch)
treeef130e6c68146fa41187450a01e44225e8ab35ff /demos/menubar
parent433ed6eecf055eba327ced7e7c0ff0ce9b5fc304 (diff)
downloadjquery-ui-7281f9f22904d97b3d244a1c8ed2450e6506d538.tar.gz
jquery-ui-7281f9f22904d97b3d244a1c8ed2450e6506d538.zip
Update menubar to forward menu option to nested menus, update default demo to set within update to the demo frame (for /demos) or window (standalone). Update visual test to have more useful defaults
Diffstat (limited to 'demos/menubar')
-rw-r--r--demos/menubar/default.html67
1 files changed, 7 insertions, 60 deletions
diff --git a/demos/menubar/default.html b/demos/menubar/default.html
index 79662bd9f..8f15be516 100644
--- a/demos/menubar/default.html
+++ b/demos/menubar/default.html
@@ -13,9 +13,10 @@
<script src="../../ui/jquery.ui.menubar.js"></script>
<script>
$(function() {
- $("td:has(.menubar)").clone().appendTo("tbody tr:not(:first)");
-
- $("#bar1, .menubar").menubar({
+ $("#bar1").menubar({
+ position: {
+ within: $("#demo-frame").add(window).first()
+ },
select: function(event, ui) {
$("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
}
@@ -24,6 +25,9 @@
$(".menubar-icons").menubar({
menuIcon: true,
buttons: true,
+ position: {
+ within: $("#demo-frame").add(window).first()
+ },
select: function(event, ui) {
$("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
}
@@ -160,63 +164,6 @@
</li>
</ul>
-<!--
-<table id="movies" class="ui-widget">
- <thead>
- <tr>
- <th data-field="Name" class="ui-widget-header">Name</th>
- <th data-field="ReleaseYear" class="ui-widget-header">Release Year</th>
- <th data-field="AverageRating" class="ui-widget-header">Average Rating</th>
- <th class="ui-widget-header"></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="ui-widget-content">Red Hot Chili Peppers: Funky Monks</td>
- <td class="ui-widget-content">1993</td>
- <td class="ui-widget-content">3.6</td>
- <td class="ui-widget-content">
- <ul class="menubar">
- <li>
- <a href="#Options">Options</a>
- <ul>
- <li><a href="#Order...">Order...</a></li>
- <li class="ui-state-disabled">Write a Review...</li>
- <li><a href="#Find Similar Movies...">Find Similar Movies...</a></li>
- <li>
- <a href="#Rate">Rate</a>
- <ul>
- <li><a href="#5 stars">5 stars</a></li>
- <li><a href="#4 stars">4 stars</a></li>
- <li><a href="#3 stars">3 stars</a></li>
- <li><a href="#2 stars">2 stars</a></li>
- <li><a href="#1 stars">1 stars</a></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </td>
- </tr>
- <tr>
- <td class="ui-widget-content">Rod Stewart: Storyteller 1984-1991</td>
- <td class="ui-widget-content">1991</td>
- <td class="ui-widget-content">3.1</td>
- </tr>
- <tr>
- <td class="ui-widget-content">Stevie Ray Vaughan and Double Trouble: Live at the El Mocambo 1983</td>
- <td class="ui-widget-content">1991</td>
- <td class="ui-widget-content">3.9</td>
- </tr>
- <tr>
- <td class="ui-widget-content">Spike and Mike's Sick &amp; Twisted Festival of Animation</td>
- <td class="ui-widget-content">1997</td>
- <td class="ui-widget-content">2.6</td>
- </tr>
- </tbody>
-</table>
--->
-
<div class="ui-widget" style="margin-top:2em; font-family:Arial">
Log:
<div id="log" style="height: 100px; width: 300px; overflow: auto;" class="ui-widget-content"></div>