Defer tooltips script

This commit is contained in:
Helen Chong 2024-07-13 19:07:13 +08:00
parent 33d86b390c
commit 9207bad41e
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@
</main>
{% block footer %}{% include "global/footer.njk" %}{% endblock %}
{% if hasTooltips %}
<script src="{{'/assets/js/tooltips.js' | url | safe}}"></script>
<script src="{{'/assets/js/tooltips.js' | url | safe}}" defer></script>
<script>
var selector = '[data-tooltip]';
var els = document.querySelectorAll(selector);