I have a bunch of elements dynamically created and I'm able to show the popover calling this script:
$('.gantt').popover({
selector: '.bar',
title: 'Test title',
content: 'Test content',
trigger: 'hover',
placement: function() { return 'top' },
container: 'body'
});
Now, I need to dynamically pass title and content from within a function and then I did like so:
[...]
onItemMouseover: function(elm, data) {
elm.popover({
selector: '.bar',
title: data.title,
content: data.content,
trigger: 'hover',
placement: function() { return 'top' },
container: 'body'
});
}
[...]
But the popover is not opening. Is there something missing?
If i call elm.remove()
the element is being removed, so elm is triggering correctly the DOM element.