peter-tanner.github.io/_javascript/modules/components/tooltip-loader.js

12 lines
270 B
JavaScript
Raw Permalink Normal View History

2024-10-13 04:56:18 +08:00
import Tooltip from 'bootstrap/js/src/tooltip';
export function loadTooptip() {
const tooltipTriggerList = document.querySelectorAll(
'[data-bs-toggle="tooltip"]'
);
[...tooltipTriggerList].map(
(tooltipTriggerEl) => new Tooltip(tooltipTriggerEl)
);
}