HTML
xxxxxxxxxx
1
<button title="Test tooltip" class="btn btn-primary">
2
Test button
3
</button>
CSS
xxxxxxxxxx
1
.bs-tooltip-auto[x-placement^=bottom] .arrow::before,
2
.bs-tooltip-bottom .arrow::before {
3
border-bottom-color: red !important;
4
}
5
.bs-tooltip-auto[x-placement^=top] .arrow::before,
6
.bs-tooltip-top .arrow::before {
7
border-top-color: red !important;
8
}
9
.bs-tooltip-auto[x-placement^=left] .arrow::before,
10
.bs-tooltip-left .arrow::before {
11
border-left-color: red !important;
12
}
13
.bs-tooltip-auto[x-placement^=right] .arrow::before,
14
.bs-tooltip-right .arrow::before {
15
border-right-color: red !important;
16
}
JS
xxxxxxxxxx
1
$("[title]").tooltip({
2
placement: 'bottom',
3
delay: { "show": 500, "hide": 100 },
4
offset: '0 10',
5
template: '<div class="tooltip" role="tooltip"><div class="arrow custom-class"></div><div class="tooltip-inner bg-success rounded-pill shadow"></div></div>'
6
});
Console errors: 0