我有一个工具提示,它会出现在任何有标题的东西上:
$("[title!=]:not(IFRAME)").tooltip();我有一个可以添加或删除的人员列表,您可以单击位于人员上方的删除按钮,单击该按钮可以将该人员替换为另一个人员。
当您单击Remove按钮时,将显示工具提示,因为该项目具有。但是一旦你换掉了那个人,工具提示就不会消失了。
我非常确定的原因是,一旦那个人被移除,你就不会有鼠标弹出,所以工具提示永远不会消失。
我试过这个:
$('.remove-player-large a').click(function() {
$("[title!=]:not(IFRAME)").tooltip().hide();
});但是没有任何幸运的建议如何解决这个问题?
这有意义吗?
发布于 2012-06-12 17:46:17
您可以使用hideTooltip()函数隐藏工具提示。
var $tooltip = null;
$(function(){
$tooltip = $("input[type='text']").tooltip({
// place tooltip on the right edge
position: "center right",
// a little tweaking of the position
offset: [-2, 10],
// use the built-in fadeIn/fadeOut effect
effect: "fade",
// custom opacity setting
opacity: 0.6
});
$("#close").click(function(){
hideTooltip();
});
});
function hideTooltip()
{
if($tooltip)
{
$tooltip.each(function(index){
var $this = $(this).data('tooltip');
if($this.isShown(true))
$this.hide();
});
}
}发布于 2014-12-29 17:45:03
jqueryUi工具提示与ipad有问题,工具提示不会消失,只要我们点击页面上的任何地方,所以这个简单的解决方案适用于我和iOS6,iOS7,iOS8设备
$("#selector ").tooltip( "close" );
you can use these method
发布于 2011-04-15 04:45:20
删除工具提示元素和链接。
$('.remove-player-large a').click(function() {
$('.tooltip').remove();//remove the tool tip element
});如果您不知道工具提示元素的类名,则需要使用firebug进行检查,或者可以在工具提示源代码中找到它
https://stackoverflow.com/questions/5668361
复制相似问题