问题
The basic functionality of my webpage is that I will have thumbnails, .thnail
which will display a project, when clicked, a drop down panel, .dropdown
, will slide down to show images (carousel plug in) of projects with respect to the thumbnail clicked.The functionality is almost there, but the transition between clicking the thumbnails is really abrupt. I want the panel to slideUp and then slideDown once ANOTHER thumbnail is selected.
The catch is that I need the .dropdown
and .thnail
to be separate, they cannot be a parent/child due to the fact that I am using a complex plug in for my carousel.
HERE IS MY JSFIDDLE
I found this tutorial , but I am having trouble implementing it because it's based off parent/child relationship while my html is based off of ID relationships.
Secondly, is there a way to relate my ID's via rel="..."
instead of href="#"
? Does it matter?
回答1:
Here's the jsfiddle to slide multiple elements. You might notice that the elements below the dropdowns would "shake" when switching between dropdown.
Take alook at this jsfiddle to minimize that shaking. The top ones are the exact same one as above, and the bottom ones are the variation.
来源:https://stackoverflow.com/questions/12032819/transition-between-multiple-slidetoggle-divs