How to bring div element to front on click


I do have 3 overlaying div elements red, blue, green. I have set different z-index on every div element. What I am trying to do is to bring the div element to the front on click. It would be great to click and show every div element one by one on repeat without selecting a specific div. So far I tried to experiment with Selector state “Pressed” to change the z-index. However it won’t let me click through all div elements.

How can I do that? Thanks for pointing me in the right direction

hi @howdytom If I understand you are trying create custom carousel. To do that you will need javaScript.

What about using Swiper instead.

@Stan Thanks, Carousel might be overkill. But Swiper would be an option I will take closer look at.