Transition between multiple slideToggle divs

三世轮回 提交于 2019-12-11 18:21:47

问题


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 .thnailto 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!