鼠标输入时未显示工具提示
tooltip not showing on mouse enter
我正在使用 qtip2 显示表中链接的工具提示,我在鼠标回车时调用它。问题是工具提示未显示,但警报有效,我无法弄清楚为什么工具提示不显示。感谢您的任何帮助。
$('#tblOrder tr td a').on('mouseenter',function(){
alert('');
var id = $('#tblOrder tr[id*="row"]').attr('id').substr(3);
$(".proper a").qtip({
content: {
text: 'Loading.....',
ajax: {
url: '<%=Url.Action("Alarms") %>',
type: 'POST',
data: {id: id},
success: function(data, status){
this.set('content.text', data);
},
error: function(xhr){
console.log(xhr.responseText);
console.log($('#tblOrder tr[id*="row"]').attr('id').substr(3));
}
}
},
show: {
effect: function() {
$(this).slideDown();
}
},
hide: {
effect: function() {
$(this).slideUp();
}
}
});
});
我在这里创建了一个 jsfiddle
你在这里 http://jsfiddle.net/f0sbo0vd/3/
$(document).on('mouseenter', '#tblOrder tr a', function(event) {
$(".proper a").qtip({
content: {
text: 'Loading.....',
ajax: {
url: '<%=Url.Action("Alarms") %>',
type: 'POST',
success: function (data, status) {
this.set('content.text', data);
},
error: function (xhr) {
console.log(xhr.responseText);
}
}
},
show: {
event: event.type,
ready: true,
effect: function () {
$(this).slideDown();
}
},
hide: {
effect: function () {
$(this).slideUp();
}
}
}, event);
});
编辑
要在链接上显示 qtip,请使用此 http://jsfiddle.net/f0sbo0vd/5/
只需更改
$(".proper a").qtip({ ... });
自
$(this).qtip({ ... });
相关文章:
- Highcharts-在单击而不是悬停时显示工具提示
- C3.js通过单击按钮显示工具提示
- 未单击按钮时显示工具提示
- 高图表在点单击时显示工具提示
- Flexslider-当鼠标悬停在点上时显示工具提示
- 高亮显示工具提示共享项,具体取决于Highcharts中悬停的系列
- 显示工具提示而不双击字段
- 在 Twitter 引导程序中自动显示工具提示,而无需放置光标
- 悬停时显示工具提示
- 隐藏 x 轴标签,但在图表.js中显示工具提示
- 突出显示工具提示中未显示名称的 3D 散点
- 如何在图像库森时更改颜色和显示工具提示
- q提示 2 - 鼠标按下以显示工具提示?鼠标向上隐藏
- D3.js水平折线图无法正确显示工具提示
- 在 d3.js 折线图中永久显示工具提示
- 如何在 SVG 上的鼠标光标旁边显示工具提示,尽管网站上有非 SVG 元素
- 高图表在类别标签悬停时显示工具提示
- 仅在完全创建时显示工具提示
- 鼠标输入时未显示工具提示
- 鼠标悬停时无法显示工具提示,jQuery1.11