jq中的tooltip提示框

使用于带title属性的所有元素的 事件代理

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>工具提示框部件(Tooltip Widget)演示</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
</head>
<body>
 
<p>
  <a href="#" title="锚描述">锚文本</a>
  <input title="输入帮助">
</p>
<script>
  $( document ).tooltip();
</script>
 
</body>
</html>

如果需要适应工具提示框指定的样式,则可以使用下面的css class名称:

ui-tooltip:工具提示框的外层容器;

ui-tooltip-content:工具提示框的内容;

猜你喜欢

转载自blog.csdn.net/weixin_38098192/article/details/81114464