mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Menu: Testing nested menus without the DOM restructuring, just need to fix display issue in IE6
This commit is contained in:
parent
e7c2eb42d0
commit
7443cb8e40
103
tests/visual/menu/nested2.html
Normal file
103
tests/visual/menu/nested2.html
Normal file
@ -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>
|
Loading…
Reference in New Issue
Block a user