开发者

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" } %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜