JqueryUI Tooltip - Customizable, themeable tooltips, replacing native tooltips.


SUBMITTED BY: jlolk3r

DATE: Jan. 21, 2016, 4:36 a.m.

FORMAT: HTML

SIZE: 1.4 kB

HITS: 1930

  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>jQuery UI Tooltip - Default functionality</title>
  6. <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  7. <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  8. <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  9. <link rel="stylesheet" href="/resources/demos/style.css">
  10. <script>
  11. $(function() {
  12. $( document ).tooltip();
  13. });
  14. </script>
  15. <style>
  16. label {
  17. display: inline-block;
  18. width: 5em;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <p><a href="#" title="That&apos;s what this widget is">Tooltips</a> can be attached to any element. When you hover
  24. the element with your mouse, the title attribute is displayed in a little box next to the element, just like a native tooltip.</p>
  25. <p>But as it's not a native tooltip, it can be styled. Any themes built with
  26. <a href="http://jqueryui.com/themeroller/" title="ThemeRoller: jQuery UI&apos;s theme builder application">ThemeRoller</a>
  27. will also style tooltips accordingly.</p>
  28. <p>Tooltips are also useful for form elements, to show some additional information in the context of each field.</p>
  29. <p><label for="age">Your age:</label><input id="age" title="We ask for your age only for statistical purposes."></p>
  30. <p>Hover the field to see the tooltip.</p>
  31. </body>
  32. </html>

comments powered by Disqus