Skip to content
Permalink
Browse files

Menu: Update default visual test, remove the disable/toggle buttons, …

…that behaviour must be covered by unit tests
  • Loading branch information...
jzaefferer committed May 18, 2012
1 parent 5fa6821 commit c0873f5da91ba6ece02c92e605e1e7c4c1d7db6f
Showing with 16 additions and 34 deletions.
  1. +16 −34 tests/visual/menu/menu.html
@@ -18,39 +18,24 @@
top: 10
}).appendTo(document.body).themeswitcher();
function create() {
menus.menu({
select: function(event, ui) {
$("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
}
});
$("#menu5").menu({
select: function(event, ui) {
$("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
},
menus: "div"
});
$("#menu6").menu({
select: function(event, ui) {
$("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
},
menus: ".menuElement"
});
}
$("#menu1, #menu2, #menu3, .menu4").menu({
select: function(event, ui) {
$("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
}
});
var menus = $("#menu1, #menu2, #menu3, .menu4"),
all = menus.add("#menu5, #menu6");
create();
$("#menu5").menu({
select: function(event, ui) {
$("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
},
menus: "div"
});
$("#toggle-destroy").toggle(function() {
all.menu("destroy");
}, create);
$("#toggle-disable").toggle(function() {
all.menu("disable");
}, function() {
all.menu("enable");
$("#menu6").menu({
select: function(event, ui) {
$("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
},
menus: ".menuElement"
});
});
</script>
@@ -286,8 +271,5 @@ <h2>Menu with custom markup, multi-line items</h2>
<div id="log" style="height: 400px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
</div>

<button id="toggle-disable">Disable / Enable</button>
<button id="toggle-destroy">Destroy / Create</button>

</body>
</html>

0 comments on commit c0873f5

Please sign in to comment.
You can’t perform that action at this time.