I’m using method: :delete on a link in rails, and trying to get a bootstrap tooltip on it.
This doesn’t show a tooltip:
=link_to "destroy", blog_path(blog), "data-original-title" => "Delete your answer", "data-placement" => "top", :rel => "tooltip", method: :delete
However, if I remove the method: :delete, the tooltip works.
How can I get a tooltip on a delete link?
I had the same problem and didn’t find any suitable solution so I started tinkering with it myself.
If you remove the
:rel => "tooltip"and add anything else, for example:rel => "nofollow", and then call$('a[rel="nofollow"]').tooltip()manually it works.Here’s the final result:
And also add the code to show the tooltip after this:
EDIT: this is not a issue anymore.