我正在使用Tipsy jquery插件,焦点触发器的作用方式与悬停触发器相同。即使字段仍然集中,即使鼠标离开输入字段,Tipsy也会停止显示。什么可能导致这个问题?基于此jQuery tipsy plugin. On focus trigger not working。这不是造成问题的什么可能会导致与Tipsy的焦点触发器发生冲突?
实际插件下面是我测试在页面上
http://uploads.glumbo.com/?op=registration
我正在使用Tipsy jquery插件,焦点触发器的作用方式与悬停触发器相同。即使字段仍然集中,即使鼠标离开输入字段,Tipsy也会停止显示。什么可能导致这个问题?基于此jQuery tipsy plugin. On focus trigger not working。这不是造成问题的什么可能会导致与Tipsy的焦点触发器发生冲突?
实际插件下面是我测试在页面上
http://uploads.glumbo.com/?op=registration
您将要更新您正在使用醉意文件。 The one you are using现在与the latest version of Tipsy显着不同。
+1好点:)和DUH,我做了所有这些工作,我认为他所需要的只是LOL的工作重点。 – Mottie 2011-03-20 05:20:14
正如Haochi所说,你需要更新你的Tipsy版本到1.0.0a。然后使用下面的代码同时添加悬停和集中到你的醉意工具提示(demo):
$('.registerform [title]')
.tipsy({
trigger: 'manual', // manual stops binding of any internal tipsy events
gravity: 'w',
fade: true
})
.bind('focus mouseenter', function(e) {
// flag indicating the input has focus
if (e.type === 'focus') {
$(this).addClass('hasFocus');
}
$(this).tipsy("show");
})
.bind('blur mouseleave', function(e) {
// if mouseleave is triggered but the input has focus, ignore it
if (!$(this).is('.hasFocus') || e.type === 'blur') {
$(this).removeClass('hasFocus').tipsy("hide");
}
});
'Tipsy'不适用于您提供的演示链接。 – 2014-02-26 10:21:35
@MohitBhansali这是因为演示链接到一个github原始文件,它不再工作。试试[这个演示](http://jsfiddle.net/Mottie/fpfCB/103/) – Mottie 2014-02-26 13:30:14
谢谢@Mottie。它的工作。 – 2014-02-27 03:12:48
代码.... Coooooode .... COoOoOoOoOoODE !!!!或者至少一个jFiddle展示。 – 2011-03-19 23:12:18
我正在尝试http://uploads.glumbo.com/?op=registration – 2011-03-19 23:15:00
您的链接不起作用!请不要在上传网站上与我们分享文件。首选方法是使用http://jsfiddle.net/,然后使用dropbox(http://www.dropbox.com)。 – Mottie 2011-03-20 04:03:45