diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2010-03-21 19:48:30 +0100 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2010-03-21 19:48:30 +0100 |
commit | ff6c15b83e7bfc99d0180209a395704bd1c5cfd9 (patch) | |
tree | 5127868195b5473e092bc6eadcade64e7417ec1a | |
parent | 3e1f97d5e5e3c4b22b4fbb8a024d2de02e086dbb (diff) | |
download | jquery-ui-ff6c15b83e7bfc99d0180209a395704bd1c5cfd9.tar.gz jquery-ui-ff6c15b83e7bfc99d0180209a395704bd1c5cfd9.zip |
Position: Adding visual testcase for #5284 - Position: Smarter collision detection
-rw-r--r-- | tests/visual/position/default.html | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/tests/visual/position/default.html b/tests/visual/position/default.html new file mode 100644 index 000000000..d99c91402 --- /dev/null +++ b/tests/visual/position/default.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8" /> + <title>Autocomplete 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="http://jqueryui.com/themeroller/themeswitchertool/"></script> + <script type="text/javascript"> + $(function() { + var ul = $("ul"); + $("input").each(function() { + $(this).position({ + my: this.id.replace(/-/, " "), + at: this.id.replace(/-/, " "), + of: "#container", + collision: "none" + }); + ul.clone().insertAfter(this).menu().position({ + my: "left top", + at: "left bottom", + of: this + }); + }); + ul.remove(); + }); + </script> + <style> + input, .ui-menu { position: absolute; } + .ui-menu { width: 200px; } + html, body { width: 100%; height: 100% } + #container { width: 95%; height: 95%; border: 1px solid black; margin: auto; } + </style> +</head> +<body> + +<div id="container"></div> + +<input id="left-top" /> +<input id="left-center" /> +<input id="left-bottom" /> +<input id="center-top" /> +<input id="center-center" /> +<input id="center-bottom" /> +<input id="right-top" /> +<input id="right-center" /> +<input id="right-bottom" /> + +<ul> + <li><a href="#">Java</a></li> + <li><a href="#">JavaScript</a></li> + <li><a href="#">Perl</a></li> + <li><a href="#">Ruby</a></li> + <li><a href="#">C++</a></li> + <li><a href="#">Python</a></li> + <li><a href="#">C#</a></li> +</ul> + +</body> +</html> |