# Hover Help

**URL:** <https://discuss.rubyonrails.org/t/hover-help/41522>\
**Category:** rubyonrails-talk\
**Created:** [April 13, 2009, 10:20pm UTC](https://discuss.rubyonrails.org/t/hover-help/41522 "2009-04-13T22:20:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jillian](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@Jillian](https://discuss.rubyonrails.org/u/Jillian)\
**Post date:** [April 13, 2009, 10:20pm UTC](https://discuss.rubyonrails.org/t/hover-help/41522/1 "2009-04-13T22:20:14Z")

</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 =\> "\<center\>\<b\>Select Language\</b\>\</

> 

\<table style=&quot;padding:5px&quot;\> \<tr\>\<td\>\<i\>All\</i\>\</td\>\<td\>For the intersection of search results.\</

> \</tr\>

\<tr\>\<td\>\<i\>Any\</i\>\</td\>\<td\>For the union of search results.\</td\>\</tr\> \<tr\>\<td\>\<i\> ⌘\</i\>\</td\>\<td\>To select more than one language.\</td\>\</tr\> \</table\>" %\>

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:** ![Phlip](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@Phlip](https://discuss.rubyonrails.org/u/Phlip)\
**Post date:** [April 14, 2009, 12:53am UTC](https://discuss.rubyonrails.org/t/hover-help/41522/2 "2009-04-14T00:53:39Z")

</div>

Jillian wrote:

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

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.
