2018-04-02 08:29:19 +02:00
|
|
|
/**
|
|
|
|
* Initialisation de Tippy
|
|
|
|
*/
|
|
|
|
$(document).ready(function() {
|
2019-03-24 18:51:30 +01:00
|
|
|
// Tooltip des aides
|
|
|
|
tippy(".helpButton", {
|
2019-02-28 12:46:38 +01:00
|
|
|
arrow: true,
|
2019-03-24 18:51:30 +01:00
|
|
|
arrowType: "round",
|
|
|
|
placement: "top"
|
|
|
|
});
|
|
|
|
// Tooltip des attributs title
|
2019-03-25 11:36:41 +01:00
|
|
|
tippy("[data-tippy-content]", {
|
2019-03-24 18:51:30 +01:00
|
|
|
arrow: true,
|
|
|
|
placement: "top"
|
2019-02-28 12:46:38 +01:00
|
|
|
});
|
2019-03-24 18:51:30 +01:00
|
|
|
// Pour les images map, pas de flèche, bulle haut suivant le curseur
|
2019-03-30 05:25:52 +01:00
|
|
|
|
2019-03-25 13:41:13 +01:00
|
|
|
tippy('img[title], a[title], area[title]', {
|
2019-03-30 05:25:52 +01:00
|
|
|
|
2019-03-24 18:51:30 +01:00
|
|
|
content(reference) {
|
|
|
|
const title = reference.getAttribute('title')
|
|
|
|
reference.removeAttribute('title')
|
|
|
|
return title
|
|
|
|
},
|
2019-03-30 05:25:52 +01:00
|
|
|
|
2019-03-24 18:51:30 +01:00
|
|
|
placement: "top",
|
|
|
|
followCursor: true,
|
|
|
|
animation: "fade",
|
|
|
|
animateFill: true
|
2019-03-30 05:25:52 +01:00
|
|
|
});
|
2019-03-11 16:57:41 +01:00
|
|
|
// Pour les images map, pas de flèche, bulle haut suivant le curseur
|
|
|
|
tippy("#image-map", {
|
|
|
|
placement: "top",
|
2019-03-24 18:51:30 +01:00
|
|
|
followCursor: true,
|
|
|
|
animation: "fade",
|
|
|
|
animateFill: true
|
2019-03-11 16:57:41 +01:00
|
|
|
});
|
2019-02-28 12:46:38 +01:00
|
|
|
});
|