Bootstrap 4 tooltips display short contextual help. They require Bootstrap's JavaScript tooltip plugin and its positioning dependency. Keep tooltip text concise and do not rely on hover alone for critical information.
<button type="button"
class="btn btn-secondary"
data-toggle="tooltip"
data-placement="top"
title="Tooltip text">
Hover or focus
</button>
$( function () {
$( '[data-toggle="tooltip"]' )
.tooltip();
});
Common values include top, right, bottom and left.
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.