Hi, I’m using the very basic #each method to reactively generate new divs from a textarea, but what I want it to do is change it’s positioning each time something is added.
{{#each story}}
<div class="storyBlock" style="left: {{storyPos}}">
<div class="date">{{displayDate}}</div>
<div class="story">{{storyContent}}</div>
</div>
{{/each}}
I figured that the style for left css positioning could be changed each time a new div is rendered. Problem is I’m not really sure how or where to create the random number to insert dynamically.
Is it when the textarea is submitted? Is it when a new div is created? It would be great to learn how to style things reactively.