JQuery的工具提示悬停在单选按钮(JQuery Tooltip Hover on Radio B

2019-09-23 15:15发布

我想有悬停在单选按钮的工具提示显示。 所以我想使用这个插件: 醉意 。 因此,这里是我的html:

<label><input type="radio" name="options" value="1" class="required" id="option1"> Option1</label>

然后,我想是这样的:

$("#option1").tipsy({fallback: "test" });

但是,当我悬停在单选按钮,没有出现过。 为什么没有任何东西出现,我如何使它发挥作用?

Answer 1:

添加title到您的input

<input type="radio" name="options" value="1" class="required" id="option1" title="MyText">



Answer 2:

这里是你如何能接近悬停的例子。 这是相当简单的...

http://jsfiddle.net/wrN2u/50/



Answer 3:

你把标题属性的文本?

<input type="radio" name="options" value="1" title="Some Text To Display" class="required" id="option1" />


文章来源: JQuery Tooltip Hover on Radio Button