March 23, 2012

Making divs slide down (not open) when a div above is opened

Question by Shaun Woolf

So here’s my question–and I’m not too well versed in programming just yet, so please be patient:

I would like to have a list of objects on my page, with each functioning as a toggle to open a div. That part I have down! What I can’t figure out is how to make it so that divs below the opened object slide below the newly opened div. Currently they just sit there on top the content within the opened div. Thanks!

Answer by Starx

Its called an Accordion Effect. Check out the jQuery UI Accordion Effect here

Here it’s a very simple version of the accordion effect, I just created it using jQuery.

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!