How to add tooltip with link_to_remote image_tag in ruby on rails?
i want show tooltip with image tag and i have written code like below but i am not able to get tooltip while mouseover...
开发者_StackOverflow中文版Code:
<%= link_to_remote image_tag('../images/save_active.gif',:method => "post",:tooltip=>"Save", :border => 0), :url => {:controller => "ptcgeodatabase" } %>
You can try this, if you are not using javascript tooltip
<%= link_to image_tag('something.png'), '#', :title => "Save" %>
Unless you're using a javascript library to generate tooltips specially, you need to use the title
attribute on your a
element (I've split this onto multiple lines for readability):
<%= link_to_remote image_tag('../images/save_active.gif',
:method => "post",
:border => 0),
:url => { :controller => "ptcgeodatabase" },
:html => { :title => "Save" } %>
精彩评论