鼠标悬停时无法显示工具提示,jQuery1.11
could not show tooltip on mouse over , jquery1.11
我的要求是在图像鼠标上显示工具提示。我正在使用 jquery1.11 .但我无法实现它。这是我的小提琴
我想在鼠标悬停在图像上的工具提示上显示下表数据:
<table class="statusRollup" style="position:absolute;">
<tr><td>tooltip Data1 </td></tr>
<tr><td>tooltip Data2</td></tr>
</table>
示例代码:
$.widget("ui.tooltip", $.ui.tooltip, {
options: {
content: function () {
return $(this).prop('title');
}
}
});
$(function () {
$('.one').attr('title', $('.statusRollup').remove().html())
$(document).tooltip();
});
他们有什么建议吗?
谢谢。
你让它工作,你只需要将title=""
属性应用于你想要的工具提示的项目。
<td class="sample-two">Row1
<img class="one" src="http://ssl.gstatic.com/gb/images/b_5dae6e31.png"
width="15" height="15" alt="" title="testing"/>
工作 JSFiddle: http://jsfiddle.net/ubKtd/1132/
Row1的IMG说测试。
我也建议访问:http://jqueryui.com/tooltip/
如果您想要在此处评论中提出的问题:
.JS:
$(function () {
$(document).tooltip({
content: function () {
return $(this).prop('title');
}
});
});
$(function () {
$('.one').attr('title', $('.statusRollup').remove().html())
$(document).tooltip();
});
还添加了jQuery UI,因为它不是从我所看到的中添加的:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>
工作 JSFiddle: http://jsfiddle.net/0w9yo8x6/3/* 使用 jQuery 1.11.1 *
相关文章:
- d3.js Chord图的动态工具提示
- Graphiti中是否有任何工具提示功能
- "工具提示"jQuery插件坏了
- 单元格的工具提示或标题不显示超过2000个字符
- d3.js用按钮更新条形图工具提示
- 使Intro.js工具提示响应
- 画布中绘制的矩形区域的弹出工具提示
- 使用CSS/JavaScript更改剑道图工具提示文本颜色
- 禁用NVD3 multiBarHorizontalChart中0值的工具提示
- 如何更改已显示的工具提示
- 如何访问高图表工具提示中的任何特定数据
- 如何在jQuery点击函数中添加并显示引导工具提示
- 我可以't使用jQuery更改工具提示引导程序的位置
- 语义UI中格式化的工具提示
- 柱状图上的Highcharts工具提示
- 引导工具提示用法,在搜索字段中
- 将工具提示添加到d3散点图中
- Highcharts工具提示不显示corrosconding文本值,而是显示'未定义'
- 工具提示在带有两个图表的d3.js中消失
- 鼠标悬停时无法显示工具提示,jQuery1.11