bootstrap tooltip custom html code example
Example 1: bootstrap button tooltip
<!-- Bootstrap button Tooltip
You can look here for in depth info:
https://getbootstrap.com/docs/4.0/components/tooltips/
OR use the bellow example : -->
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="top" title="Tooltip on top">
Tooltip on top
</button>
Example 2: bootrap tooltip
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="top" title="Tooltip on top">
Tooltip on top
</button>
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="right" title="Tooltip on right">
Tooltip on right
</button>
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">
Tooltip on bottom
</button>
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="left" title="Tooltip on left">
Tooltip on left
</button>
Example 3: bootstrap tooltip
<!-- Bootstrap 5 Tooltips -->
<button
type="button"
class="btn btn-secondary"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="Tooltip on top"
>
Tooltip on top
</button>
<button
type="button"
class="btn btn-secondary"
data-bs-toggle="tooltip"
data-bs-placement="right"
title="Tooltip on right"
>
Tooltip on right
</button>
<button
type="button"
class="btn btn-secondary"
data-bs-toggle="tooltip"
data-bs-placement="bottom"
title="Tooltip on bottom"
>
Tooltip on bottom
</button>
<button
type="button"
class="btn btn-secondary"
data-bs-toggle="tooltip"
data-bs-placement="left"
title="Tooltip on left"
>
Tooltip on left
</button>
Example 4: bootstrap tooltip on dynamic element
$("body").tooltip({
selector: '[data-toggle="tooltip"]'
});