Formula to swap an image based on STATE

@Joyce @Doc How can I write a formula that switches the URL for an image based on state? I want to have a hover state on an image element - and when you hover - the image is changed to a different URL.

It obviously does not work to just change the binding to the image between states - so, I assume I need some syntax to know if hover state is active on the element and write a switch formula …?

I resolved with just having both images in a div - and setting their display to none based on state.

1 Like

@Mark_Pederson thanks for the update and glad you solved it!

@Mark_Pederson How do you access the div’s current state? I want to change image when the div’s hover state is active. Thanks.

I just created a ‘manual’ hover state that fixed it. Thanks.

1 Like

Excellent work div state is a great solution yes

Using apply to children and based on the div parent you change the state

hi, how did you formulate the condition so that the second image is only shown when it is hovered?

Yes

can you explain to me exactly step by step how you solved this with which formulas? somehow it doesn’t work for me and I can’t find the error

hi, can you explain to me step by step how you solved it manually, the condition is not working properly for me