To save space in a narrow table cell I want to use the bootstrap tooltip to display extra content on hover. However, the tooltip uses the :rel option in the a tag. I do not need a link, just its options...and I don't want the link to go anywhere. I have used:
link_to display.text, "#", :rel => "tooltip", ...blah..blah
link_to_function display.text, "#", :rel => ...blah...blah
Both work to an extent, however both return to the top of the page.
Its probably smelly code to use a link that isn't really a link to get at some other function. Is there a rails way of creating a dummy link? Is there an "approved" method of accomplishing this?
You can initialize tooltips on other elements besides anchors. Try a span or a div.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With