5π
β
I found using this worked for my purposes:
page1.html:
...
{% for element in someList %}
{% include "popup.html" with element=element %}
<div class="col s3 some-button"><a onclick="$(showPopup('popup'));">More Info</a></div>
{% endfor %}
π€user2424607
0π
In your link you can add an attribute data-element="{{ element }}"
and in the onclick
method associated with the link you can retrieve the value like this:
var el = $(this).data("element");
Now, pass el
to your popup.
π€ettanany
Source:stackexchange.com