Hover Help


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</

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 wrote:

<%= link_to “?”, “”, :title => "Select Language</

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
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
and Rails’s favorite JS library is prototype.js, a Google for
tooltips] will give good hits.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs