views:

22

answers:

2

I would like to add to my site a on-hover/on-select dictionary. What are they usually called, so I can search on the web?

I am thinking in a piece of javascript code that detects which word the mouse is currently hovering/selecting and after some time it shows a baloon with the hovered word definition.

+1  A: 

Using onMouseover for this could be very annoying to your users. The NYTimes website uses the selected text (highlighted by double-clicking a word or dragging to select) to display a bubble that, when clicked, opens a popup with a query on that word or term.

See http://graphics8.nytimes.com/js/common/screen/altClickToSearch.js.

atxryan
PS - I also find the NYT implementation to be annoying because I'm one of those readers who constantly click text while reading. (which in turn annoys people around me. Won't the annoyances ever end?!?)
atxryan
Thanks for the suggestion, I edited the question to also specify this other type of dictionary.
Jader Dias
+1  A: 

Are you thinking of tooltips that display the definition? You can achieve this with a style sheet by adding alt tags and adding a style="cursor:help" attribute.

Alternatively you could use a tooltip library like these jQuery ones.

Chris S