# Hover Help

**URL:** <https://www.ruby-forum.com/t/hover-help/165440>\
**Category:** Rails\
**Created:** [April 14, 2009, 12:53am UTC](https://www.ruby-forum.com/t/hover-help/165440 "2009-04-14T00:53:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jillian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e0b2c6/32.png) [@Jillian](https://www.ruby-forum.com/u/Jillian)\
**Post date:** [April 14, 2009, 12:53am UTC](https://www.ruby-forum.com/t/hover-help/165440/1 "2009-04-14T00:53:26Z")

</div>

Hi,

We are interested in using “hover help” in rails - that is, we want to  
be able to hover over a link and have a help bubble pop up. Using  
link\_to like so:

\<%= link\_to “?”, “”, :title =\> " **Select Language** \</  
center\>

| _All_ | For the intersection of search results. |
| _Any_ | For the union of search results. |
| _âŒ˜_ | To select more than one language. |

" %\>

Is it possible to use HTML in the :title attribute? As it stands now,  
the entire thing shows up as a string, and removing the quotation  
marks makes it throw a compilation error.

~Jillian

---

<div class="post-metadata">

**Author:** ![Jillian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e0b2c6/32.png) [@Jillian](https://www.ruby-forum.com/u/Jillian)\
**Post date:** [April 14, 2009, 2:54am UTC](https://www.ruby-forum.com/t/hover-help/165440/2 "2009-04-14T02:54:27Z")

</div>

Jillian wrote:

> \<%= link\_to “?”, “”, :title =\> " **Select Language** \</  
> center\>

Your attempt simply passes raw HTML into the title=’’. Rails assumes  
your \<  
symbols are content, such as “cat \< dog”, and either it escapes them, or  
it  
passes them thru and they break your page’s HTML.

You need to learn to do tooltips at the JS level directly, before  
invoking them  
from a Rails helper. Because the common word for this technique is  
“tooltip”,  
and Rails’s favorite JS library is prototype.js, a Google for  
[prototype.js  
tooltips] will give good hits.
