Toggle between two elements

Just thought I would share how to achieve a toggle effect between two elements, in a Query block or wherever but it does work with repeated elements.

Enjoy! :slight_smile:

13 Likes

Thanks for your great tip! I have just a little question: I want to add a transition effect when toggle between elements. On which element do I have to add the transition effect?

That would require a different setup @msteinlein.
You can’t transition on a plain toggle like that.

Thanks @Marius - a better understanding how interactions work, is added to my todolist for the upcoming days :wink:

I think that would be exclusively related to CSS block properties @msteinlein.
The interaction is only toggling one class and dependent on that, your CSS rules will apply/change. So nothing to tweak in that regard.

Might setup 2-3 examples with different behaviours and share here.
If you have something specific in mind, feel free to share your thoughts and I’ll consider that as well.

1 Like