aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-05-18 10:40:44 -0400
committerScott González <scott.gonzalez@gmail.com>2012-05-18 10:40:44 -0400
commitb52c4ece53a8c3cd12adfd988fac13e9db851e11 (patch)
tree872c7fbf5e665d4719e666c66b1ade130f9fdcd4
parent63915d16af8e2795a7def28155bc9b14ca2f67d5 (diff)
downloadjquery-ui-b52c4ece53a8c3cd12adfd988fac13e9db851e11.tar.gz
jquery-ui-b52c4ece53a8c3cd12adfd988fac13e9db851e11.zip
Menu visual tests: cleanup.
-rw-r--r--tests/visual/menu/menu.html49
1 files changed, 20 insertions, 29 deletions
diff --git a/tests/visual/menu/menu.html b/tests/visual/menu/menu.html
index b73588bce..f92de61db 100644
--- a/tests/visual/menu/menu.html
+++ b/tests/visual/menu/menu.html
@@ -3,39 +3,30 @@
<head>
<meta charset="utf-8">
<title>Menu Visual Test: Default</title>
- <link rel="stylesheet" href="../visual.css" type="text/css" />
- <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" title="ui-theme" />
- <script type="text/javascript" src="../../../jquery-1.7.2.js"></script>
- <script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../../ui/jquery.ui.menu.js"></script>
- <script type="text/javascript">
+ <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css">
+ <script src="../../../jquery-1.7.2.js"></script>
+ <script src="../../../ui/jquery.ui.core.js"></script>
+ <script src="../../../ui/jquery.ui.widget.js"></script>
+ <script src="../../../ui/jquery.ui.position.js"></script>
+ <script src="../../../ui/jquery.ui.menu.js"></script>
+ <script>
$(function() {
- $.fn.themeswitcher && $('<div/>').css({
- position: "absolute",
- right: 10,
- top: 10
- }).appendTo(document.body).themeswitcher();
+ function logger( event, ui ) {
+ $( "<p>" ).text( "Selected: " + ui.item.text() ).appendTo( "#log" );
+ }
- $("#menu1, #menu2, #menu3, .menu4").menu({
- select: function(event, ui) {
- $("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
- }
+ $( "#menu1, #menu2, #menu3, .menu4" ).menu({
+ select: logger
});
- $("#menu5").menu({
- select: function(event, ui) {
- $("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
- },
- menus: "div"
+ $( "#menu5" ).menu({
+ menus: "div",
+ select: logger
});
- $("#menu6").menu({
- select: function(event, ui) {
- $("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
- },
- menus: ".menuElement"
+ $( "#menu6" ).menu({
+ menus: ".menuElement",
+ select: logger
});
});
</script>
@@ -266,9 +257,9 @@
</div>
</div>
-<div class="ui-widget" style="clear: left; margin-top:2em; font-family:Arial">
+<div style="position: absolute; top: 1em; right: 1em;">
Log:
- <div id="log" style="height: 400px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
+ <div id="log" style="height: 400px; width: 300px; overflow: auto; border: 1px solid #000;"></div>
</div>
</body>