0

I have a table that has a column with tooltips in it. W/out dynatables, it works. But, when I apply dynatables to it, the tooltips are not shown anymore.

Here is my JS:

var initTooltips = function(){
    $('.tt').tooltipster({
        animation: 'fade',
        delay: 200,
        theme: ['tooltipster-punk', 'tooltipster-ls'],
        contentAsHTML: true
    });
    alert("INIT");
};

var $statsTable = $('#stats-table');
if ($statsTable.length) {
    $statsTable.dynatable({}).bind('dynatable:afterProcess', initTooltips);
    initTooltips();
}

The INIT gets fired AND the tooltipstered class gets applied to the according element, but it does not show the actual tooltip on hover. I am not sure, how to debug this and what the cause may be. Nothing happens in Firebug on hover either.

Any idea?

vinS
  • 1,417
  • 5
  • 24
  • 37
PrimuS
  • 2,505
  • 6
  • 33
  • 66
  • I don't know Dynatable but it must edit the DOM and the data attached to elements is lost. Try initiliazing tooltips only after Dynatable is done doing its job. – Louis Ameline Feb 28 '17 at 13:03
  • Well, don't I do that with `dynatable:afterProcess`? The `initTooltips` function initializes the tooltips. The do get applied to the elements but not shonw on hover... – PrimuS Feb 28 '17 at 13:08
  • Dynatable may be initialized asynchronously, try to remove `initTooltips();` – Louis Ameline Feb 28 '17 at 13:28

0 Answers0