I'm using a fresh installation of Laravel Framework 9.43.0.
Bootstrap and jQuery are working fine, except voor tooltip(). It's giving me this error:
Uncaught TypeError: $(...).tooltip is not a function
I tried a lot of different combinations of importing JS libraries. This is my current bootstrap.js:
import _ from 'lodash';
window._ = _;
import $ from 'jquery';
window.$ = window.jQuery = $;
import * as popper from '@popperjs/core';
window.Popper = popper;
import 'bootstrap';
$('body').tooltip({
selector: '[data-bs-toggle="tooltip"]',
});
Dependencies
- jQuery: 3.6.2
- Popper.js: 2.11.6
- Bootstrap: 5.2.3
How can I make tooltip() work?