Streaming live at 10am (PST)

Show/Hide each div separately


#1

So I worked out how to show/hide each div. When you click it opens up. Then you can click close and it will close again. But it's on all of them at the same time. Can someone suggest how when an image is clicked only one div opens. Then when close it clicked only that div closes.

I don't want to have to write a new interaction for every single div.

https://preview.webflow.com/preview/blocs?preview=31c983c46ee8b96bfb2f582549f080de


#2

You can add a child class of different names to each of your divs.


#3

I'd had to write an interaction for each child class right? Thats what its looking like as I work through it.


#4

I actually figured it out. I just changed Hidden Div Appear to only sibling elements.

I read this post: http://forum.webflow.com/t/resolved-reusing-an-interaction-for-show-hide-images/10286/2


#5

Also, do not forget that you'll have to put each pair of divs (the "clickable" one + the "content to show" one) in a separate div.


#6

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.