1 résultat trouvé
- 22 sept. 2025, 09:06
- Forum : Javascript
- Sujet : JavaScript ne fonctionne pas dans un widget Elementor
- Réponses : 9
- Vues : 37908
Re: JavaScript ne fonctionne pas dans un widget Elementor
In Elementor, the script runs before the widget is injected, so DOMContentLoaded doesn’t catch it. 👉 Quick fix: use window.onload instead of DOMContentLoaded. <script> window.onload = function(){ const yearFilter = document.getElementById('yearFilter'); const pdfList = document.getElementById('pdfLi...