I need to pass the value of tag
variable in filterByTags()
. But the following code throws an error saying "tag
is not defined."
{% for tag in unique_tags %}
<button type="button" id="{{ tag }}" onclick="filterByTags(tag)">{{ tag }}</button>
{% endfor %}