1 | <!doctype html> |
---|
2 | <html lang="en"> |
---|
3 | <head> |
---|
4 | <title>wijtooltip-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.wijtooltip.css" rel="stylesheet" type="text/css" /> |
---|
14 | <script src="../../external/jquery-1.8.0.min.js" type="text/javascript"></script> |
---|
15 | <script src="../../external/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script> |
---|
16 | <script src="../../external/jquery.mousewheel.min.js" type="text/javascript"></script> |
---|
17 | <script src="../../external/jquery.bgiframe-2.1.3-pre.js" type="text/javascript"></script> |
---|
18 | <script src="../../wijmo/jquery.wijmo.wijutil.js" type="text/javascript"></script> |
---|
19 | <script src="../../wijmo/jquery.wijmo.wijtooltip.js" type="text/javascript"></script> |
---|
20 | <script id="scriptInit" type="text/javascript"> |
---|
21 | $(document).ready(function () { |
---|
22 | $("#tooltiptarget>a").wijtooltip({ |
---|
23 | showCallOut: true, |
---|
24 | closeBehavior: 'sticky' |
---|
25 | }); |
---|
26 | |
---|
27 | }); |
---|
28 | function applyPosition() { |
---|
29 | $("#tooltiptarget>a").wijtooltip("option", "position", { my: $("#my1").get(0).value + " " + $("#my2").get(0).value, at: $("#at1").get(0).value + " " + $("#at2").get(0).value }); |
---|
30 | }; |
---|
31 | </script> |
---|
32 | </head> |
---|
33 | <body class="demo-single"> |
---|
34 | <div class="container"> |
---|
35 | <div class="header"> |
---|
36 | <h2> |
---|
37 | wijtooltip-position</h2> |
---|
38 | </div> |
---|
39 | <div class="main demo"> |
---|
40 | <!-- Begin demo markup --> |
---|
41 | <div id="tooltiptarget" class="ui-helper-reset ui-widget-header ui-corner-all" style="padding: 1em;"> |
---|
42 | <a href="#" title="tooltip">tooltip</a> |
---|
43 | </div> |
---|
44 | <!-- End demo markup --> |
---|
45 | <div class="demo-options"> |
---|
46 | <!-- Begin options markup --> |
---|
47 | <div style="height: 70px"> |
---|
48 | <div style="width: 180px; float: left;"> |
---|
49 | <span style="padding-right: 10px;">my:</span><select id="my1"> |
---|
50 | <option value="left">left</option> |
---|
51 | <option value="center">center</option> |
---|
52 | <option value="right">right</option> |
---|
53 | </select> |
---|
54 | <select id="my2"> |
---|
55 | <option value="top">top</option> |
---|
56 | <option value="center">center</option> |
---|
57 | <option value="bottom" selected="selected">bottom</option> |
---|
58 | </select> |
---|
59 | <br /> |
---|
60 | <span style="padding-right: 14px;">at:</span><select id="at1"> |
---|
61 | <option value="left">left</option> |
---|
62 | <option value="center">center</option> |
---|
63 | <option value="right" selected="selected">right</option> |
---|
64 | </select> |
---|
65 | <select id="at2"> |
---|
66 | <option value="top">top</option> |
---|
67 | <option value="center">center</option> |
---|
68 | <option value="bottom">bottom</option> |
---|
69 | </select> |
---|
70 | </div> |
---|
71 | </div> |
---|
72 | <input type="button" onclick="applyPosition();" value="apply" /> |
---|
73 | <!-- End options markup --> |
---|
74 | </div> |
---|
75 | </div> |
---|
76 | <div class="footer demo-description"> |
---|
77 | <p> |
---|
78 | This sample illustrates how to use the <b>position</b> option to change where the |
---|
79 | tooltip appears.</p> |
---|
80 | <p> |
---|
81 | Select a position in the drop-down lists and click the <b>apply</b> button. Then |
---|
82 | hover over <b>tooltip</b>.</p> |
---|
83 | </div> |
---|
84 | </div> |
---|
85 | </body> |
---|
86 | </html> |
---|