I am trying to keep bootstrap tooltip alive while being hovered so I followed vikas' answer here (How can I keep bootstrap popover alive while the popover is being hovered?). I made something like:
element.tooltip({
html: true
}).on('mouseenter', function () {
var _this = this;
$(this).tooltip('show');
$('.tooltip').on('mouseleave', function () {
$(_this).tooltip('hide');
});
}).on('mouseleave', function () {
var _this = this;
setTimeout(function () {
if (!$('.tooltip:hover').length) {
$(_this).tooltip('hide')
}
}, 100);
});
That works fine in most web browsers (Chrome, Firefox, Safari, IE) except Opera. In Opera, $('.tooltip:hover').length always returns 0. Is there a way to make it compatible with Opera?
Or do you know an alternative way to check whether mouse is currently over tooltip content or not?