I’ve searched the entire forum for something that helps me, but I couldn’t find. I’m trying to write a code that changes the box color depending on the text that is in the title.
The box is inside a repeater, and when I try to use the one that I wrote, it changes all of them .
Hi! Based on your code, it looks like you’re on the right track, but there’s a small issue in the way you’re selecting the box element inside the repeater item.
This code uses a switch statement to check the value of the “textStatus” variable, which contains the text of the title. The switch statement sets the background color of the box based on the value of “textStatus”. The “default” case is used to set the background color to transparent if the title doesn’t match any of the specified values. Good luck!