Juery基础 专题
您的位置:JS框架 > Juery基础专题 > jQuery Tooltip
jQuery Tooltip
作者:--    发布时间:2019-11-20

jquery tooltip 插件取代了原生的工具提示框,让它们可自定义,您只需要调整它们的内容、位置和外观即可。

该插件目前版本是 1.3,已经很长时间没有更新,推荐使用 jquery ui 工具提示框(tooltip)

如需了解更多有关 jquery ui 工具提示框(tooltip)的细节,请查看 api 文档 jquery ui 工具提示框部件(tooltip widget)

实例演示

jquery tooltip 插件演示。

<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>jquery ui tooltip - default functionality</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  <script  class="lazy" data-original="//code.jquery.com/jquery-1.10.2.js"></script>
  <script  class="lazy" data-original="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script>
  $(function() {
    $( document ).tooltip();
  });
  </script>
  <style>
  label {
    display: inline-block;
    width: 5em;
  }
  </style>
</head>
<body>
 <p><a href="#" title="that's what this widget is">tooltips</a> can be attached to any element. when you hover
the element with your mouse, the title attribute is displayed in a little box next to the element, just like a native tooltip.</p><p>but as it's not a native tooltip, it can be styled. any themes built with<a href="http://jqueryui.com/themeroller/" title="themeroller: jquery ui's theme builder application">themeroller</a>will also style tooltips accordingly.</p><p>tooltips are also useful for form elements, to show some additional information in the context of each field.</p><p><label for="age">your age:</label><input id="age" title="we ask for your age only for statistical purposes.">
</p><p>hover the field to see the tooltip.</p>
 
 </body>
</html>

相关阅读

jquery easyui 教程:jquery easyui 基础插件 - tooltip 提示框

网站声明:
本站部分内容来自网络,如您发现本站内容
侵害到您的利益,请联系本站管理员处理。
联系站长
373515719@qq.com
关于本站:
编程参考手册