2

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?

Charlie Yabben
  • 307
  • 2
  • 7
  • 13
  • possible duplicate of http://stackoverflow.com/questions/7838646/displaying-a-tooltip-when-user-hovers-on-label-of-radio-button-in-jquery – Abhijeetchindhe Oct 05 '12 at 20:19

3 Answers3

6

Add title to your input.

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

Ricardo Alvaro Lohmann
  • 26,031
  • 7
  • 82
  • 82
  • For somereason this displays text at the top of my page rather than right next to the radio button like a normal tooltip. Any ideas why? – Charlie Yabben Oct 05 '12 at 20:27
1

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

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

Jish
  • 207
  • 1
  • 8
0

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" />
fanfavorite
  • 5,128
  • 1
  • 31
  • 58