JQuery Tooltip Hover on Radio Button

梦想的初衷 提交于 2019-12-10 11:29:46

问题


I want to have a tooltip show on hover over a radio button. So I'm trying to use this plugin: tipsy. So here's my html:

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

And then I tried something like this:

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

But when i hovered over the radio button, nothing appeared. Why isn't anything appearing and how do I make it work?


回答1:


Add title to your input.

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




回答2:


Here's an example of how you could approach a hover-over. It's fairly simple...

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




回答3:


Are you putting the text in the title attribute?

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


来源:https://stackoverflow.com/questions/12753415/jquery-tooltip-hover-on-radio-button

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!