| 1 | <!doctype html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 | <title>jQuery UI Tooltip - Track the mouse</title> |
| 7 | <link rel="stylesheet" href="../../themes/base/all.css"> |
| 8 | <link rel="stylesheet" href="../demos.css"> |
| 9 | <style> |
| 10 | label { |
| 11 | display: inline-block; |
| 12 | width: 5em; |
| 13 | } |
| 14 | </style> |
| 15 | <script src="../../external/requirejs/require.js"></script> |
| 16 | <script src="../bootstrap.js"> |
| 17 | $( document ).tooltip({ |
| 18 | track: true |
| 19 | }); |
| 20 | </script> |
| 21 | </head> |
| 22 | <body> |
| 23 | |
| 24 | <p><a href="#" title="That's what this widget is">Tooltips</a> can be attached to any element. When you hover |
| 25 | the element with your mouse, the title attribute is displayed in a little box next to the element, just like a native tooltip.</p> |
| 26 | <p>But as it's not a native tooltip, it can be styled. Any themes built with |
| 27 | <a href="https://jqueryui.com/themeroller/" title="ThemeRoller: jQuery UI's theme builder application">ThemeRoller</a> |
| 28 | will also style tooltips accordingly.</p> |
| 29 | <p>Tooltips are also useful for form elements, to show some additional information in the context of each field.</p> |
| 30 | <p><label for="age">Your age:</label><input id="age" title="We ask for your age only for statistical purposes."></p> |
| 31 | <p>Hover the field to see the tooltip.</p> |
| 32 | |
| 33 | <div class="demo-description"> |
| 34 | <p>Here the tooltips are positioned relative to the mouse, and follow the mouse while it moves above the element, using the <code>track</code> option.</p> |
| 35 | </div> |
| 36 | </body> |
| 37 | </html> |