jquery UI工具提示html与链接

我想使用 jquery UI工具提示.

在工具提示中,我希望HTML中会有一个链接.

我看到这篇文章(Jquery UI tooltip does not support html content)说如何在工具提示中使用html.

但是当我想在工具提示添加链接时有一个问题.

当我用光标进入点击链接的工具提示时,工具提示消失(因为我从分配给工具提示的元素中mouSEOut).

我能做什么?

谢谢.

更新:

$(function () {
  $(document).tooltip({
      content: function () {
          return $(this).prop('title');
      }
  });

});

示例:http://jsfiddle.net/jLkcs/

解决方法

由于jQuery UI的本质,工具提示是不可能开箱即用的.

您可以添加一些技巧(在jQuery论坛上发现,但是链接丢失…)让工具提示延迟关闭,并让您有时间点击链接.

二手api文档http://api.jqueryui.com/tooltip/

码:

$(function () {
    $(document).tooltip({
        content: function () {
            return $(this).prop('title');
        },show: null,close: function (event,ui) {
            ui.tooltip.hover(
            function () {
                $(this).stop(true).fadeto(400,1);
            },function () {
                $(this).fadeOut("400",function () {
                    $(this).remove();
                })
            });
        }
    });
});

演示:http://jsfiddle.net/IrvinDominin/jLkcs/5/

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: <span id=&quot...
jQuery 添加水印 <script src="../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...