[jQuery] Close any other row before showing a new one

[jQuery] Close any other row before showing a new one

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=702231321-28032007><FONT face=Arial
color=#0000ff size=2>That did the ticket Jake. BEAUTIFUL
solution!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=702231321-28032007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=702231321-28032007><FONT face=Arial
color=#0000ff size=2>++jake</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> discuss-bounces@jquery.com
[mailto:discuss-bounces@jquery.com] <B>On Behalf Of </B>Jake
McGraw<BR><B>Sent:</B> Wednesday, March 28, 2007 3:24 PM<BR><B>To:</B> jQuery
Discussion<BR><B>Subject:</B> Re: [jQuery] Close any other row before showing a
new one<BR></FONT><BR></DIV>
<DIV></DIV>Have to tried ':visible'
selector?<BR><BR>$('.hidden:visible').slideUp("fast");<BR><BR>- jake<BR><BR>
<DIV><SPAN class=gmail_quote>On 3/28/07, <B class=gmail_sendername>Alex
Ezell</B> <<A href="mailto:aezell@gmail.com"> aezell@gmail.com</A>>
wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">I
faced a similar issue with a project I was working on. I never found a
solution. Of course, I also never bothered to post here (consider me easily
distracted). I'll be interested to see what the solution is. <BR><BR>/alex
<BR><BR>
<DIV>
<DIV><SPAN class=e id=q_1119a353b15c2bf0_1><SPAN class=gmail_quote>On 3/28/07,
<B class=gmail_sendername>Andy Matthews</B> <<A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:amatthews@dealerskins.com" target=_blank>
amatthews@dealerskins.com</A>> wrote:</SPAN></SPAN></DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV><SPAN class=e id=q_1119a353b15c2bf0_3>
<DIV>
<DIV><SPAN><FONT face=Arial size=2>I've got a series of rows of data, some
of which can be expanded to show additional information. I'd like to hide
any open row before showing a new one. I've tried hiding all of them (or
sliding up) but the display goes wonky because most of them are NOT open.
</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial size=2>This is what a row looks
like:</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2><div id="specials-123456-details"
class="hidden"></div></FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2>or</FONT></SPAN></DIV>
<DIV><SPAN>
<DIV><SPAN><FONT face=Arial size=2><div id="newInv-997845-details"
class="hidden"></div></FONT></SPAN></DIV></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial size=2>I'm using slideToggle to open the
row:</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial
size=2>$(child).html(data).slideToggle("fast");</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial size=2>and I've tried hiding them like
so:</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial
size=2>$('.hidden').slideUp();</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial size=2>and</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial size=2>$('.hidden').hide();</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial size=2>So I'm wondering, how can I get ONLY the
ones that are open already?</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><SPAN style="FONT-SIZE: 14px"><B><FONT
face="Century Gothic"></FONT></B>
<DIV align=left><SPAN><B><FONT face="Century Gothic"><FONT face=Arial
size=2><SPAN><FONT face=Arial
size=2>____________________________________</FONT></SPAN></FONT></FONT></B></SPAN></DIV>
<DIV><SPAN><B><FONT face="Century Gothic"><FONT face=Arial
size=2><SPAN></SPAN></FONT></FONT></B></SPAN><B><FONT
face="Century Gothic"></FONT></B> </DIV><B><FONT
face="Century Gothic">Andy Matthews<BR></FONT></B></SPAN><SPAN
style="FONT-SIZE: 11px"><FONT face="Century Gothic"><SPAN
style="FONT-SIZE: 8.5pt">Senior Coldfusion
Developer</SPAN><BR></FONT></SPAN><SPAN style="FONT-SIZE: 11px"><FONT
face="Century Gothic"><FONT color=#808080><IMG alt="" hspace=0
border=0><BR></FONT>Office:  877.707.5467 x747<BR>Direct:
 615.627.9747<BR>Fax:  615.467.6249</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 11px"><FONT face="Century Gothic"><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:amatthews@dealerskins.com"
target=_blank>amatthews@dealerskins.com</A><BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://www.dealerskins.com/"
target=_blank>www.dealerskins.com</A></FONT></SPAN></DIV>
<DIV><FONT face=Arial
size=2></FONT> </DIV></DIV></SPAN></DIV><BR>_______________________________________________<BR>jQuery
mailing list<BR><A onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:discuss@jquery.com" target=_blank>discuss@jquery.com</A><BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://jquery.com/discuss/"
target=_blank>http://jquery.com/discuss/</A><BR><BR></BLOCKQUOTE></DIV><BR><BR>_______________________________________________<BR>jQuery
mailing list<BR><A onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:discuss@jquery.com">discuss@jquery.com</A><BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://jquery.com/discuss/"
target=_blank>http://jquery.com/discuss/</A><BR><BR><BR
clear=all></BLOCKQUOTE></DIV><BR></BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/















































































































    • Topic Participants

    • lists