You could just add classes for open divs? On Fri, Apr 24, 2009 at 4:59 PM, Musixz Man <mus...@hotmail.com> wrote:
> Hi all! > > I have anywhere from 3 - 8 DIVs on a page that I open/close (animate height > toggle) via a button and want to close any (one) that are already open when > another is opened - just like an accordion. > > How do I either determine the current open state of a DIV so I know which > to close, or maybe close all of them (less efficient) before opening a new > one? > > I can't use the UI accordion because of the way the DIVs are separated and > nested deep within a bunch of other stuff. > > The code I am using to toggle them is: > > onclick="$('#slideblock_<?php echo $group['id'] > ?>').animate({height:'toggle',opacity:'toggle'}, 'fast')" > > Any help would be great. Thanks!! > > > > ------------------------------ > Windows Live™ SkyDrive™: Get 25 GB of free online storage. Check it > out.<http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_042009> >