Yep. that's it precisely!
Thanks, Glen. I'll go the route you've taken and see what I can do. Rick From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Glen Lipka Sent: Monday, October 22, 2007 12:22 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: How would I modify this code to... I whipped up a demo. http://www.commadot.com/jquery/faq.php Is this the kind of thing you were looking for? Glen On 10/22/07, Rick Faircloth < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: .cause any open details div to close when another details div opens? $(document).ready(function() { $('div.calendar').find('div.details').hide().end().find('table.clickme').click(function() { var answer = $(this).next(); if (answer.is(':visible')) { answer.slideUp(); } else { answer.slideDown(); } }); }); This has been working great to open a div with details when a table is clicked (yes, I'm using a complete table for the info because it animates more smoothly than a row). However, now I'd like for an open div to slide up when another table is clicked is slide down a new div. In other words, have only one open details div at a time. Perhaps I should add a class to a details div when it slides down (opens) called "open " and then change the class to "closed" when another table is clicked and then cause any details div's with the newly assigned "closed" class to slide up (close)? If so, can this new approach be integrated into the code above or does the code need to be rewritten? Suggestions? Rick