I have a condition using jinja, and I want to run a piece of js code when that condition is met.
Here is my code:
M.toast({html: 'I am a toast!', classes: 'rounded'})
{% if condition %}
run js right here
{% endfor %}
Edit: BTW I am using materializecss toasts. Link: https://materializecss.com/toasts.html