So I have products being rendered by using one template. In the template, I have a button where the user can then click a button to get more information about the product in a modal.
How can I copy the name from the displayed product in the template to a new modal template?
<div id="result"></div>
Template with Displayed Products
{{for data}}
<div class="product">
<h1>{:prod.productName}</h1>
<div class="short-desc">
{:prod.shortDesc}
{:prod.price}
<button class="modal prod-btn">Find out more</button>
</div>
</div>
{{/for}}
Modal Template where I want to copy same data name from current displayed template
<div id="product-modal">
<div class="">{:prod.productName}</div>
<div class="">
{:prod.longDesc}
{:prod.price}
</div>
</div>