it is possible to use a tooltip and popover of Bootstrap 3 on the same element?
I have a table and want to show on each row (tr) a tooltip. Additionally I want to show a popover when a user clicks on the row. Both components need the data-toggle attribute so I doubt it is possible to do so.
Does anybody knows if it is possible or if there is a workaround?
I needed both tooltip and popover on the same element. The tooltip is for information when the user hovers, and the popover is for a confirmation box when they click.
In this case, I need the tooltip to go away when the popover appears. I added a little bit of code to @davidkonrad's solution like this:
You dont have to use
data-toggle
,title
and so on. Invoke the bootstrap plugins manually. See this example :script :
demo fiddle -> http://jsfiddle.net/79fXt/
You can apply the tooltip to the
<tr>
and the popover to all of the child<td>
's. Define the attributes in javascript and append the attributes to the relevant class (in this exampleclass="my-popover"
) so that you don't have to write out the popover multiple times.For example:
View:
Javascript:
Bootply here