Forum
Perch every
Hi
i want to use perch:every to create a slideshow
Each slide has 3 divs in it.
How can i do this?
I tried:
<perch:before><div class="cycle-slide"></perch:before>
<perch:every count="3"></div><div class="cycle-slide"></perch:every>
<div class="event">
<span class="date"><span class="day"><perch:events id="eventDateTime" format="j" /></span>
<br /><span class="month"><perch:events id="eventDateTime" format="%b %Y" /></span></span>
<span class="detail"><perch:events id="eventTitle" /></span>
</div>
<perch:every count="n+3"></div></perch:every>
but the first slide only contains 2. then it works every 3...
Thanks
You need to use 3n+1 - it's the same as nth-child in CSS.
3n+3 seemed to work
thanks for the hint