I have a link_to
in my rails app. It functions as a tooltip. When the user hovers over the link: It displays some helper text.
If the user accidentally clicks the tooltip: I do not want the default behavior of jumping to the top of the page. I know with javascript I could preventDefault
, but is there an easy rails way to get this same behavior?
I was thinking of remote: true
but it still jumps to the top of the page.
Code:
<%= link_to "#", title: 'my helper text', remote: true do %>
<i class="fa fa-question-circle"></i>
<% end %>