Commit 1c590599 authored by Toby Hodges's avatar Toby Hodges

fix conditional for exercise div display

parent 70f0909b
......@@ -57,8 +57,10 @@ function change_exercises_content_by_platform(form_control){
{% for platform in page.exercises %}
document.getElementById("{{ platform[0] | slugify }}-exercises-div").style.display = 'none';
{% endfor %}
{% if page.exercises %}
if (!form_control || document.getElementById(form_control).value == "default-exercises") {
set_exercises_view_defaults();
{% endif %}
{% for platform in page.exercises %}
} else if (document.getElementById(form_control).value == "{{ platform[0] | slugify }}-exercises") {
document.getElementById("{{ platform[0] | slugify }}-exercises-div").style.display = 'block';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment