refactoring toolTilFront
This commit is contained in:
parent
25bb923ae3
commit
1d97c1d5a4
|
|
@ -1 +1 @@
|
|||
<?php return array('dependencies' => array(), 'version' => 'b6bb3ed64d8d863ca5b9');
|
||||
<?php return array('dependencies' => array(), 'version' => 'a4bcdbd8641c0feace22');
|
||||
|
|
|
|||
|
|
@ -6,10 +6,8 @@ var __webpack_exports__ = {};
|
|||
async function initTooltips() {
|
||||
let tooltipWords = document.querySelectorAll(".tooltip-word");
|
||||
const vocabulairesPostsIds = Array.from(tooltipWords).map(element => element.getAttribute("data-definition-id"));
|
||||
console.log(vocabulairesPostsIds);
|
||||
try {
|
||||
const tooltipData = await getTooltipsDatas(vocabulairesPostsIds);
|
||||
console.log("lol", tooltipData);
|
||||
tooltipWords.forEach((word, index) => {
|
||||
const foundTooltipDatas = tooltipData.find(tooltip => tooltip.id === parseInt(word.getAttribute("data-definition-id")));
|
||||
if (foundTooltipDatas) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user