Replace image on click

Hello.

how can i replace image on click?

thanks

Do you want to replace the image when you click on it or when you click on another button?

Both would be nice :slight_smile: I’m actually a new user and i will have to get familiar with both ways. But “click on another button” is the important one here.

You can use Interactions to achieve this. Take a look at the docs here: Interactions & animations course | Webflow University

I thought so, but when i add a style to an image i can’t target it in “affect other elements” section.

Redo your element and think about this ahead. Try to set the class on your element at the lowest level possible. If you’re just adding a class on top of all the existing ones, most likely it does not work.

So I cant target nested elements at all?

Not at the moment, but we hope to add it soon.