jQueryUI 工具提示小部件,用于在单击时显示工具提示

问题描述:

如何修改新的 jQueryUI 的工具提示小部件以在文档上的某些元素的单击事件上打开工具提示,而其他元素仍然在鼠标悬停事件上显示它们的工具提示.在单击打开的情况下,应通过单击文档上的其他位置来关闭工具提示.

How the new jQueryUI's tooltip widget can be modified to open the tooltip on click event on certain element's on document, while the others are still showing their tootip on mouseover event. In click-open case the tooltip should be closed by clicking somewhere else on the document.

这可能吗?

jsfiddlehttp://jsfiddle.net/bh4ctmuj/225/

这可能会有所帮助.

<!-- HTML --> 
      <a href="#" title="Link Detail in Tooltip">Click me to see Tooltip</a>      
 <!-- Jquery code--> 

    $('a').tooltip({          
     disabled: true,
     close: function( event, ui ) { $(this).tooltip('disable'); }
    });

  $('a').on('click', function () {
     $(this).tooltip('enable').tooltip('open');
   });