简体   繁体   中英

How to change an html external link with tooltips into link_to in rails

Apologies I am a noob to all this, I think I have searched for my question but can't find a solution. Anyway, I have the following line of code from a purchased theme:

<a href="#" class="header-btn header-btn-sm" data-hover="tooltip" data-placement="left" title="link me on linkedin"> <i class="fa fa-linkedin header-icon"></i> </a>

I want to turn it into a rails link_to, I can handle the class aspect, but not sure how to keep the icon and manage the tooltip js?

Thanks

<%= link_to("#", {"data-hover" => "tooltip"}) do %>  
  <i class="fa fa-linkedin header-icon"></i>  
<% end %>  

Read more about link_to

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM