PDA

View Full Version : Animated collapsible DIV



SK1PT
01-01-2008, 08:52 PM
1) Script Title: Animated collapsible DIV

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm

3) Describe problem: I was just wondering if you had a number of these one under the other, if you open one then click on another the original would close then the new one you click on opens?

ddadmin
01-02-2008, 06:18 AM
Right now the only scripts that do that are the "Switch Content" series, such as Switch Content I (http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm). Keep an eye out though during the next couple of weeks for that to change.

SK1PT
01-02-2008, 09:37 PM
thanks. i'll keep a look out. pretty curious.

billymortz
02-27-2008, 01:19 PM
I have found a way to make this work...You can stack these and make an awesome sliding menu. If you use the slideit() function in your <a> tag to expand one item and also use the slideup() function in the same <a> tag to retract all other items. When you click the item you want, it will retract any open items (any items not open get ignored). The code for the <a> tag looks something like this:


<a class="menu" href="javascript:menu_item_1.slideit(); javascript:menu_item_2.slideup(); javascript:menu_item_3.slideup(); javascript:menu_item_4.slideup();">

then the second item would look like this:

<a class="menu" href="javascript:menu_item_2.slideit(); javascript:menu_item_1.slideup(); javascript:menu_item_3.slideup(); javascript:menu_item_4.slideup();">

...and so on

This works great in both IE and Firefox!

What I'm trying to figure out now is how to make the divs slide up rather than down, so the menu could be placed at the bottom of the page. Any help on this would be greatly appreciated!