I know this is something simple, but I'm stuck. I have several forms in my rails3 application that need to add tooltips using tipsy . The text in the tooltips should be defined in the \ original-title header, but I just can't figure it out how to set it for a text box.
<%= f.text_field :what %>
gives me
<input id="name_which" name="name[which]" size="30" type="text">
and I just can't figure out where to put the title text.
For example, this one in html works fine
<input type="text" name="tooltipform" title="Tooltip text">
In application.js is defined
$(window).load(function() {
$('#form-example [title]').tipsy({trigger: 'focus', gravity: 'w'});
});
I know that this is something basic, and I am ashamed of myself. Thanks in advance.
source
share