Skip to content

Instantly share code, notes, and snippets.

View chraiet's full-sized avatar
🚀

Mohamed Chraiet chraiet

🚀
View GitHub Profile
@chraiet
chraiet / with-data-attributes.js
Created January 28, 2019 17:28 — forked from JeffreyWay/with-data-attributes.js
Vue Tooltips: Three Ways
import PopperTooltip from 'tooltip.js';
new Vue({
el: '#app',
mounted() {
document.querySelectorAll('[data-tooltip]').forEach(elem => {
new PopperTooltip(elem, {
placement: elem.dataset.tooltipPlacement || 'top',
title: elem.dataset.tooltip