Simple javascript mouseover tooltip

Date May 16, 2008

So I wanted something simple, easy that could handle the information that explains what these options mean. There’s so many way to handle this, and some are more powerful (see if you can find the rickroll), and other aren’t, using the title=”" attribute in a link. The one I’ve done is closer to the simple, but allows for a little more control and looks a lot better!

So I have a form with a number of checkboxes and radio buttons. There’s a lot of stuff going on there, like 23 or more. I can’t remember all them, and so when people ask me what this one does, or that one controls I have to dig through some code to remember what they are for (yes I can guess, but I’m too lazy for any of it).

So what I did was add a little famfamfam silk ‘help’ icon next to each one, and gave it a mouseover event to show a tool tip.