1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/UI/jQuery/TooltipBinder.js

26 lines
633 B
JavaScript
Raw Normal View History

2013-06-22 09:24:24 +03:00
'use strict';
define(
[
'bootstrap'
], function () {
$(document).on('mouseenter', '[title]', function () {
2013-07-14 09:06:18 +03:00
var element = $(this);
if (!element.attr('data-placement') && element.parents('.control-group').length > 0) {
element.attr('data-placement', 'right');
}
var container = element.parents('.modal-body');
if (container.length === 0) {
container = 'body';
}
element.tooltip({
container: container
});
2013-07-14 09:06:18 +03:00
element.tooltip('show');
});
});