I keep getting Uncaught SyntaxError: Unexpected token ILLEGAL in my {% endfor %} line - I'm using jinja2 in Google app engine python server code and the error is in one of my html templates: I'm trying to create a menu of categories that show subcategories contingent on what parent category was picked - I want it to slide toggle to show sub categories. I'm new to JS/Jquery. Any ideas on what is wrong with my syntax??
function create_first() {
var first_level = "<div id='colOne'>";
{% for each in by_subject_level1 %}
first_level+= "{{each.name1}}<br />";
{% endfor %};
$(#filtered_courses).append(first_level);
}