#How to Range through a list on button click (html_templates)

3 messages · Page 1 of 1 (latest)

undone bay
#

So i want to create a image gallery and i range through 1-10 lets say,
so i have my images in ../static/images/ right
and i have a
<div class="image_holder"> <img src="../static/images/{{.}}.jpg"> </div> (the {{.}} just ranges through 1 to 10 )
but lets say each time i click the button i want the path to change
so lets say if it was <div class="image_holder"> <img src="../static/images/1.jpg"> </div>
i want it <div class="image_holder"> <img src="../static/images/2.jpg"> </div>
i can do the number change but i dont know how to change it after clicking a button

glacial briar
#

you need js

undone bay
#

so u mean
make the js iterate over the thingys
oh okay that will do