Bootstrap Question:
Download Job Interview Questions and Answers PDF
Please consider the HTML code snippet below.
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="My Title">Hover over me</button>
What is missing for a tooltip to show properly?
Answer:
Bootstrap’s Tooltip plugin is not CSS-only, like other plugins are. For performance reasons, the Tooltip plugin is opt-in, and to use it you must initialize it using JavaScript with the following example code:
$(function () {
$('[data-toggle="tooltip"]').tooltip();
});
$(function () {
$('[data-toggle="tooltip"]').tooltip();
});
Download Bootstrap Interview Questions And Answers
PDF