Označení hotových kroků

This commit is contained in:
Emil Miler 2021-01-23 15:32:22 +01:00
parent ed53c0488e
commit fb28ad5455
3 changed files with 12 additions and 0 deletions

View File

@ -18,5 +18,7 @@ ol {
font-size:2em;
color:$primary;
}
&.completed { opacity: .4; }
}
}

View File

@ -65,5 +65,6 @@
</main>
{% endblock content %}
{% block script %}{% endblock script %}
</body>
</html>

View File

@ -47,3 +47,12 @@
</main>
{% endblock content %}
{% block script %}
<script>
let list_items = document.querySelectorAll('ol li');
for(let i=0; i<list_items.length; i++){
list_items[i].addEventListener('click', function(){ this.classList.toggle("completed"); }, false);
}
</script>
{% endblock script %}