Was just reading another post "Trying to show a div on mouseover of menu item... " and pointed me to the solution The answer: if ($(this).parent().next().is(':hidden'))
On Jan 13, 11:03 am, Brad Hile <[EMAIL PROTECTED]> wrote: > Hi > I have a simple accordion menu and would like to prevent the already > open dd from being closed and reopened when clicked on. > > eg. > > $("#menu dt a").click(function(){ > // only activate if dd is hidden so currently active block is not > reopened > if(hidden???) { $("#menu dd:visible").slideUp("slow"); } > $(this).parent().next().slideDown("slow").addClass("open"); > return false; > > }); > > Can anyone suggest how to test the state of the current element > I'm guessing $(this).parent().next().something? but don't know how to > get its current state > > thanks > Brad