I have a repeat on the page that’s showing different links, think of it as a menu.
For example the repeat is looping through an object with 3 items in it.
It’s displaying a name it got from the database, so example output:
<p>Item 1</p>
<p>Item 2</p>
<p>Item 3</p>
Now for each item I want to execute javascript code that I wrote which checks some things in the database and as a result will output ‘true’ or ‘false’.
When it’s true, I want to apply a class with the dynamic attribute setting, so for example it’ll be:
<p class="true">Item 1</p>
<p class="false">Item 2</p>
<p class="false">Item 3</p>
The real solution is more complex
How can I execute this javascript function for each item in the repeat? I tried to simply put a in a repeat children. But that just executed it once.