A
A
AinuRM2022-04-05 18:12:54
Django
AinuRM, 2022-04-05 18:12:54

Why doesn't if work in Django?

{% if document.body.scrollTop > 20 or document.documentElement.scrollTop > 20 %}
{% include 'inc/footer.html' %}
{% else %}
{% include 'inc/footer_fixed.html' %}
{% endif %}

Everything seems to be correct, but why is the footer fixed when scrolling?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question