This repository has been archived by the owner on Jan 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap-more.js
43 lines (40 loc) · 1.82 KB
/
bootstrap-more.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
(
function($)
{
function Hide_tooltip()
{
$(this).tooltip('hide');
}
$(document).ready
(
function()
{
// Support detection: SVG in <img> elements
if (document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#Image', '1.1'))
{
$('body').addClass('svg-in-img');
}
if ($.fn.tooltip)
{
// Initialize tooltips on elements below
$('.tooltip-hover-top') .tooltip({'trigger': 'hover', 'placement': 'top'}) .click(Hide_tooltip);
$('.tooltip-hover-right') .tooltip({'trigger': 'hover', 'placement': 'right'}) .click(Hide_tooltip);
$('.tooltip-hover-bottom') .tooltip({'trigger': 'hover', 'placement': 'bottom'}) .click(Hide_tooltip);
$('.tooltip-hover-left') .tooltip({'trigger': 'hover', 'placement': 'left'}) .click(Hide_tooltip);
$('.tooltip-click-top') .tooltip({'trigger': 'click', 'placement': 'top'});
$('.tooltip-click-right') .tooltip({'trigger': 'click', 'placement': 'right'});
$('.tooltip-click-bottom') .tooltip({'trigger': 'click', 'placement': 'bottom'});
$('.tooltip-click-left') .tooltip({'trigger': 'click', 'placement': 'left'});
$('.tooltip-focus-top') .tooltip({'trigger': 'focus', 'placement': 'top'});
$('.tooltip-focus-right') .tooltip({'trigger': 'focus', 'placement': 'right'});
$('.tooltip-focus-bottom') .tooltip({'trigger': 'focus', 'placement': 'bottom'});
$('.tooltip-focus-left') .tooltip({'trigger': 'focus', 'placement': 'left'});
$('.tooltip-manual-top') .tooltip({'trigger': 'manual', 'placement': 'top'});
$('.tooltip-manual-right') .tooltip({'trigger': 'manual', 'placement': 'right'});
$('.tooltip-manual-bottom') .tooltip({'trigger': 'manual', 'placement': 'bottom'});
$('.tooltip-manual-left') .tooltip({'trigger': 'manual', 'placement': 'left'});
}
}
);
}
)(jQuery);