jquery工具提示无法处理文本输入

时间:2012-01-21 20:35:09

标签: jquery html textbox

我正在使用本网站提供的jQuery工具提示

http://flowplayer.org/tools/tooltip

使用此代码正常工作

$("input[title]").tooltip({ effect: 'slide'});

这应该将工具提示应用于具有title标记

的任何元素

这对于按钮,图像等工作正常,但是当我使用文本框进行尝试时,只有在文本框中实际点击时才出现工具提示,为什么我会看到这种行为?

1 个答案:

答案 0 :(得分:1)

因为它是默认行为 - http://flowplayer.org/tools/tooltip/index.html

events: {
  def:     "mouseover,mouseout",
  input:   "focus,blur",
  widget:  "focus mouseover,blur mouseout",
  tooltip: "mouseover,mouseout"
}

您可以使用事件管理更改此行为:http://flowplayer.org/tools/tooltip/index.html#events

$("element").tooltip({
    events: {
        input: 'mouseover,mouseout'
    }
});
相关问题