Tsallaka zuwa abun ciki
Justice Tech School

Tooltips and Popovers

These need JavaScript to be initialised.

Example
<button class="btn btn-dark" data-bs-toggle="tooltip" title="Hello">Hover</button>
<script>
  document.querySelectorAll("[data-bs-toggle=tooltip]").forEach(function (el) {
    new bootstrap.Tooltip(el);
  });
</script>

Exercise

Create one.

new bootstrap.(el)

Quiz Test

Why initialise tooltips?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.