tooltip and popover not working on TABLE elements
Hey there,
Like the title says, triggering a tooltip or popover javascript on a link inside a TABLE, TR or TD simply does not work, whereas using the exact same code with a DIV, SPAN, etc. works perfectly fine.
Using this javascript:
$(document).ready(function() {
$('.example').tooltip({
selector: 'A'
});
});
This does not work:
< table class="example" >< a href="#" title="this should show up" >hover me< /a >< /table >
Whereas this works just fine:
< div class="example" >< a href="#" title="this should show up" >hover me< /a >< /div >
Is it just me?
(spaces between < > added on purpose to allow HTML code to display on Github)
I have noticed the same. Via inspector I can see that the tooltip does get initialized -- the "title" attribute is removed and replaced with "data-original-title" -- but no tooltip displays on hover.
EDIT: My issue turned out to be unrelated to the table it was in. In my case the tooltips resided on an overlayed div. The tooltip was appearing, but with a lower z-index it was hidden underneath my div. My solution (jQuery):
$('.my-link').tooltip({placement: function(tip){
$(tip).css('z-index',999999);
return 'bottom';
}});
The tooltip plugin could perhaps be improved by checked the z-index of the target element and incrementing that for the tt element.
doesn't apear to be aproblem - if you can create a reproducible case in jsfiddle - please reopen this issue. thanks!
SO has answer to this question https://stackoverflow.com/a/36384326/4050261