assets/js/wordfinder-home.js in word-games-theme-2.7.1 vs assets/js/wordfinder-home.js in word-games-theme-2.7.2
- old
+ new
@@ -55,19 +55,23 @@
} else {
item.nextElementSibling.removeAttribute("data-tip")
imgElement.src = "/assets/images/close-btn.svg"
tooltipElement.style.setProperty('--tooltip-padding', '0');
tooltipElement.style.setProperty('--tooltip-border-style', 'none');
- }
- item.nextElementSibling.addEventListener("click", () => {
- e.target.value = ""
- imgElement.src = "/assets/images/questionmark.svg"
- setTimeout(() => {
- item.nextElementSibling.setAttribute("data-tip", item.nextElementSibling.id)
- }, 100);
- tooltipElement.style.setProperty('--tooltip-padding', '0.5rem');
- tooltipElement.style.setProperty('--tooltip-border-style', 'soild');
- })
+ }
+ })
+
+ item.nextElementSibling.addEventListener("click", () => {
+ const parentElement = item.parentElement;
+ const imgElement = parentElement.querySelector('img');
+ const tooltipElement = parentElement.querySelector('.filter-tooltip');
+ item.value = ""
+ imgElement.src = "/assets/images/questionmark.svg"
+ setTimeout(() => {
+ item.nextElementSibling.setAttribute("data-tip", item.nextElementSibling.id)
+ }, 100);
+ tooltipElement.style.setProperty('--tooltip-padding', '0.5rem');
+ tooltipElement.style.setProperty('--tooltip-border-style', 'soild');
})
})
const loadResource = (FILE_URL, data = {}, async = true, type = "text/javascript") => {