source: ether_statistics/web/resources/js/Wijmo.2.2.2/Wijmo-Open/development-bundle/samples/menu/position.html @ 651

Last change on this file since 651 was 651, checked in by vmipsl, 12 years ago

wijmo

File size: 4.4 KB
RevLine 
[651]1<!doctype html>
2<html lang="en">
3<head>
4    <title>Menu - Position</title>
5    <meta charset="utf-8" />
6    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
7    <meta name="description" content="%description%" />
8    <meta name="keywords" content="" />
9    <meta name="author" content="ComponentOne" />
10
11    <link href="../../themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" />
12   
13    <link href="../../themes/wijmo/jquery.wijmo.wijsuperpanel.css" rel="stylesheet" type="text/css" />
14    <link href="../../themes/wijmo/jquery.wijmo.wijmenu.css" rel="stylesheet" type="text/css" />
15    <script src="../../external/jquery-1.8.0.min.js" type="text/javascript"></script>
16    <script src="../../external/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script>
17    <script src="../../external/jquery.mousewheel.min.js" type="text/javascript"></script>
18    <script src="../../external/jquery.bgiframe-2.1.3-pre.js" type="text/javascript"></script>
19    <script src="../../wijmo/jquery.wijmo.wijutil.js" type="text/javascript"></script>
20    <script src="../../wijmo/jquery.wijmo.wijsuperpanel.js" type="text/javascript"></script>
21    <script src="../../wijmo/jquery.wijmo.wijmenu.js" type="text/javascript"></script>
22    <script type="text/javascript">
23        $(document).ready(function () {
24            $("#wijmenu1").wijmenu({
25                orientation: 'vertical',
26                trigger: "#btn1"
27            });
28
29            $("#my1,#my2,#at1,#at2").change(function () {
30                $("#wijmenu1").wijmenu("option", "position", { my: $("#my1").get(0).value + " " + $("#my2").get(0).value, at: $("#at1").get(0).value + " " + $("#at2").get(0).value });
31            });
32        });
33    </script>
34</head>
35<body class="demo-single">
36    <div class="container">
37        <div class="header">
38            <h2>
39                Position</h2>
40        </div>
41        <div class="main demo">
42            <!-- Begin demo markup -->
43            <button id="btn1">
44                click here</button>
45            <ul id="wijmenu1">
46                <li><a href="#">Breaking News</a></li>
47                <li><a href="#">Entertainment</a></li>
48                <li><a href="#">Finance</a></li>
49                <li><a href="#">Food &#38; Cooking</a></li>
50                <li><a href="#">Lifestyle</a>
51                    <ul>
52                        <li><a href="#">submenu</a></li></ul>
53                </li>
54                <li><a href="#">News</a></li>
55                <li><a href="#">Politics</a></li>
56                <li><a href="#">Sports</a></li>
57            </ul>
58            <!-- End demo markup -->
59            <div class="demo-options">
60                <!-- Begin options markup -->
61                <div class="option-row">
62                    <label>
63                        My</label>
64                    <select id="my1">
65                        <option value="left">left</option>
66                        <option value="center">center</option>
67                        <option value="right">right</option>
68                    </select>
69                    <select id="my2">
70                        <option value="top">top</option>
71                        <option value="center">center</option>
72                        <option value="bottom">bottom</option>
73                    </select>
74                </div>
75                <div class="option-row">
76                    <label>
77                        At</label>
78                    <select id="at1">
79                        <option value="left">left</option>
80                        <option value="center">center</option>
81                        <option value="right">right</option>
82                    </select>
83                    <select id="at2">
84                        <option value="top">top</option>
85                        <option value="center">center</option>
86                        <option value="bottom" selected="selected">bottom</option>
87                    </select>
88                </div>
89                <!-- End options markup -->
90            </div>
91        </div>
92        <div class="footer demo-description">
93            This sample demonstrates how the <b>position</b> option can be used to determine
94            where a menu opens relative to a trigger, such as a button that is clicked to open
95            the menu.
96        </div>
97    </div>
98</body>
99</html>
Note: See TracBrowser for help on using the repository browser.