JQuery Tooltip Hover on Radio Button

2019-06-02 22:41发布

问题:

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" />