Skip to content
Permalink
Browse files

Menu: Testing nested menus without the DOM restructuring, just need t…

…o fix display issue in IE6
  • Loading branch information
jzaefferer committed Mar 23, 2010
1 parent e7c2eb4 commit 7443cb8e40925bea435a32613c4ff40d1d9c7f5f
Showing with 103 additions and 0 deletions.
  1. +103 −0 tests/visual/menu/nested2.html
@@ -0,0 +1,103 @@
<!doctype html>
<html>
<head>
<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.4.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.autocomplete.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript">
$(function() {
$.fn.position2 = function(options) {
return this.css({
top: 0,
left: 0
}).position(options);
}
var menus = $("#menu").menu().position2({
my: "left top",
at: "center bottom",
of: "button"
}).find("ul").menu().hide();
var sub1 = menus.filter(":first").show().position2({
my: "left top",
at: "right center",
of: "#menu"
});
sub1.find("ul:first").show().position2({
of: sub1,
offset: "-10 50"
});
});
</script>
<style>
body { font-size:62.5%; }
.ui-menu { width: 200px; position: absolute; }
.ui-menu .ui-icon { float: right; }
ul, li {margin: 0; padding: 0}
</style>
</head>
<body>

<button>Show context menu</button>
<br/>
<select>
<option>some option with some text</option>
</select>

<ul id="menu">
<li>
<a href="#">Amsterdam</a>
<ul>
<li><a href="#">Aberdeen</a></li>
<li><a href="#">Ada</a></li>
<li>
<a href="#">Adamsville</a>
<ul>
<li><a href="#">Anaheim</a></li>
<li>
<a href="#">Cologne</a>
<ul>
<li><a href="#">Mberdeen</a></li>
<li><a href="#">Mda</a></li>
<li><a href="#">Mdamsville</a></li>
<li><a href="#">Mddyston</a></li>
<li><a href="#">Mmesville</a></li>
</ul>
</li>
<li><a href="#">Frankfurt</a></li>
</ul>
</li>
<li><a href="#">Addyston</a></li>
<li><a href="#">Amesville</a></li>
</ul>
</li>
<li><a href="#">Anaheim</a></li>
<li><a href="#">Cologne</a></li>
<li><a href="#">Frankfurt</a></li>
<li>
<a href="#">Magdeburg</a>
<ul>
<li><a href="#">Mberdeen</a></li>
<li><a href="#">Mda</a></li>
<li><a href="#">Mdamsville</a></li>
<li><a href="#">Mddyston</a></li>
<li><a href="#">Mmesville</a></li>
</ul>
</li>
<li><a href="#">Munich</a></li>
<li><a href="#">Utrecht</a></li>
<li><a href="#">Zurich</a></li>
</ul>

<div class="ui-widget" style="margin-top:2em; font-family:Arial">
Log:
<div id="log" style="height: 400px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
</div>

</body>
</html>

0 comments on commit 7443cb8

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