Récupération extra

This commit is contained in:
Fred Tempez 2022-02-18 12:44:21 +01:00
parent b49c7b5bf5
commit bd786bd6bb
1 changed files with 46 additions and 35 deletions

View File

@ -1,38 +1,49 @@
/**
* Initialisation de Tippy
*/
$(document).ready(function() {
// Tooltip des aides
tippy(".helpButton", {
arrow: true,
arrowType: "round",
placement: "top"
});
// Tooltip des attributs title
tippy("[data-tippy-content]", {
arrow: true,
placement: "top"
});
// Pour les images map, pas de flèche, bulle haut suivant le curseur
tippy('img[title], a[title], area[title]', {
content(reference) {
const title = reference.getAttribute('title')
reference.removeAttribute('title')
return title
},
placement: "top",
followCursor: true,
animation: "fade",
animateFill: true
});
// Pour les images map, pas de flèche, bulle haut suivant le curseur
tippy("#image-map", {
placement: "top",
followCursor: true,
animation: "fade",
animateFill: true
});
});
$(document).ready(function () {
// Tooltip des attributs title
tippy("[data-tippy-content]", {
arrow: true,
placement: "top"
});
// Pour les images map, pas de flèche, bulle haut suivant le curseur
tippy('img[title], a[title]:not(.button), area[title]', {
content(reference) {
const title = reference.getAttribute('title')
reference.removeAttribute('title')
return title
},
placement: "top",
followCursor: true,
animation: "fade",
animateFill: true
});
// Tooltip des aides
tippy('a.button[title]', {
content(reference) {
const title = reference.getAttribute('title')
reference.removeAttribute('title')
return title
},
delay: [1000,250],
placement: "bottom",
followCursor: false,
arrow: true,
animateFill: true,
arrowType: "round",
});
// Pour les images map, pas de flèche, bulle haut suivant le curseur
tippy("#image-map", {
placement: "top",
followCursor: true,
animation: "fade",
animateFill: true
});
});