[英]Remove tipTip tool tip
See http://code.drewwilson.com/entry/tiptip-jquery-plugin 参见http://code.drewwilson.com/entry/tiptip-jquery-plugin
$(".someClass").tipTip();
used to add special tool tip to html elements. 用于向html元素添加特殊工具提示。
How can I remove,such a tiptip tool tip created? 如何删除这样创建的技巧提示?
I've rewritten some parts of the plugin to make it much easier to work with. 我重写了插件的某些部分,以使其更易于使用。 However, there is a lot more that could be done to clean up the code.
但是,还有很多工作可以清理代码。
Basically, I just used a custom event namespace ( .tip
) which allowed me to re-structure the plugin and create a destroy method that simply calls $(this).off('.tip');
基本上,我只是使用了一个自定义事件名称空间 (
.tip
),它使我能够重新构建插件并创建一个只需调用$(this).off('.tip');
的destroy方法$(this).off('.tip');
. 。
The new plugin code is a little too long to post here so take a look at this pastebin: http://pastebin.com/VaXHWE5N 新的插件代码太长了,无法在此处发布,因此请看一下此pastebin: http : //pastebin.com/VaXHWE5N
I've also created a working fiddle with the updated code: http://jsfiddle.net/hQmvk/3/ 我还用更新的代码创建了一个工作提琴: http : //jsfiddle.net/hQmvk/3/
Use custom attribute for tooltip text (do not use 'title' or data-attributes) and set attribute value to empty string. 将自定义属性用于工具提示文本(请勿使用“标题”或数据属性),并将属性值设置为空字符串。
For example, 例如,
// add tooltip $(".test-element").tipTip({ attribute: 'tooltip-content' }); ... // clear tooltip $(".test-element").attr('tooltip-content', '')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.