vue.jsvuejs2tooltipbootstrap-sass

Tooltip for bootstrap-sass is not work


Used bootstrap-sass in my vue project, but the tooltip is not work. Below is my code:

<span class="fa fa-fast-backward page-item-button" data-toggle="tooltip" data-original-title="First Page"></span>

According to bootstrap document, we must initialize tooltip before use it. So I just add this code in my main.js, and it works well.

// Initialize all tooltips of bootstrap.
$(function () {
  $('[data-toggle="tooltip"]').tooltip()
})

Solution

  • According to bootstrap document, we must initialize tooltip before use it. So I just add this code in my main.js, and it works well.

    // Initialize all tooltips of bootstrap.
    $(function () {
      $('[data-toggle="tooltip"]').tooltip()
    })