I need some help in this… I want to display more info when people click on the image. So i tried to use “tabs”, but they dont collapse again when i click in another stuff. I hear about an animation, but i don figure out how to do it.
Haha yes it seems you’re going nowhere with your tabs acting like giant tooltips (:
The principle you’re looking for: One click, or hover, on your element make another element, containing your infos, appear.
You could make the info appear when hovering the initial element, and make it disappear when you stop hovering. The info can be aside of your initial element, or even on top. You have some design decisions to take here, and you have several options to put it together.
Example 5 from the same page show you how to put element on top of another and display it on hover.
Look on one of my project, I made one element displaying the details on hover. The one on the right remains static. Click on the image if it doesn’t animate.
More one question. I have to do a different interaction for each image that i have, right? Duplicate the interaction and the class? I have several images to do it.
Thanks again! I forgot this tutorial! rs
The slider can work too you think? (i put in the site already for test)
I don’t think so. You’ll see two extremely handy options just below the class target field called “limit to nested elements” and “limit to sibling elements”.
So, nested elements are actually child elements, and sibling are siblings. Example.
In the example above, the “container” is the parent, and .product photo and .product description are its childs. .product photo and .product description are siblings (brothers).
In the example above, .product description is a child of .product photo. It’s nested in it.
So you can use either structures. Let’s say you use the first one. Then check the “limit to siblings” checkbox in your interaction. That way, it will always target the .product description sibling element. So you’ll have one interaction for all your images/products and it will only affect siblings elements, not siblings of others elements on the page.
Hey @vincent!
This is my last question, i promisse!!!
I do what you show me (not with the final layout) but its seens to be a bug or something that i did wrong. The text appears and after have the animation of the div that i build. Take a look… maybe its my browser, i dont know.
I take a screenshot of the animation, when opens and close.
On the following video I show you how to solve this, and the animation bug, and the other animation bug.
Basically, overflow hidden on the description container to hide the text while reducing the height, then remove the padding of the description container because it affects the height, preventing to be zero, and then removing the last step of your interaction, because it messes up with the height of the orange block. It’s one way to solve this last one, there’s many and cleaner.