Re: [jQuery] Close any other row before showing a new one
Thanks Klaus...good point. I'll change that to something a little more meaningful. andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Klaus Hartl Sent: Wednesday, March 28, 2007 6:19 PM To: jQuery Discussion Subject: Re: [jQuery] Close any other row before showing a new one Jake McGraw schrieb: > Have to tried ':visible' selector? > > $('.hidden:visible').slideUp("fast"); By the way, reading ".hidden:visible" shows to me that the class name "hidden" is purely presentational and not very well chosen. How can a hidden thing be visible? Would be less confusing to call it "additional" for example. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Close any other row before showing a new one
Klaus, You're absolutely right, that would be far better. Instead of 'hidden' for all items not shown, 'selected' would be a better class for the item currently shown. Rob. On 3/29/07, Klaus Hartl <[EMAIL PROTECTED]> wrote: Rob Desbois schrieb: > How about a class 'hideable' to style all of the rows hidden or not, and > a class 'hidden' which does the actual hiding? I think "hideable" is still a purely presentational class name. Let's imagine this is going to be changed and the hideables are supposed to be shown all time. You would have to change the class name to have that still make sense (think of co-workers and others reading your code), but with a class name of "additional", "description" etc. it doesn't matter if the element gets shown, gets hidden, or it maybe gets only hidden in print and handheld media types... That said, your're better off with a class name that adds a little semantic to the element and describes the purpose of the element in question. -- Klaus ___ jQuery mailing list [EMAIL PROTECTED] http://jquery.com/discuss/56 -- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 "There's a whale there's a whale there's a whale fish" he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Close any other row before showing a new one
Rob Desbois schrieb: > How about a class 'hideable' to style all of the rows hidden or not, and > a class 'hidden' which does the actual hiding? I think "hideable" is still a purely presentational class name. Let's imagine this is going to be changed and the hideables are supposed to be shown all time. You would have to change the class name to have that still make sense (think of co-workers and others reading your code), but with a class name of "additional", "description" etc. it doesn't matter if the element gets shown, gets hidden, or it maybe gets only hidden in print and handheld media types... That said, your're better off with a class name that adds a little semantic to the element and describes the purpose of the element in question. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Close any other row before showing a new one
How about a class 'hideable' to style all of the rows hidden or not, and a class 'hidden' which does the actual hiding? Then, to hide all and show a specific one: $('.hideable').not('.hidden').addClass('hidden'); $('#specials-' + num + '-details').removeClass('hidden'); or something along those lines. On 3/29/07, Klaus Hartl <[EMAIL PROTECTED]> wrote: Jake McGraw schrieb: > Have to tried ':visible' selector? > > $('.hidden:visible').slideUp("fast"); By the way, reading ".hidden:visible" shows to me that the class name "hidden" is purely presentational and not very well chosen. How can a hidden thing be visible? Would be less confusing to call it "additional" for example. -- Klaus ___ jQuery mailing list [EMAIL PROTECTED] http://jquery.com/discuss/103 -- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 "There's a whale there's a whale there's a whale fish" he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Close any other row before showing a new one
Jake McGraw schrieb: > Have to tried ':visible' selector? > > $('.hidden:visible').slideUp("fast"); By the way, reading ".hidden:visible" shows to me that the class name "hidden" is purely presentational and not very well chosen. How can a hidden thing be visible? Would be less confusing to call it "additional" for example. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Close any other row before showing a new one
That did the ticket Jake. BEAUTIFUL solution! ++jake _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jake McGraw Sent: Wednesday, March 28, 2007 3:24 PM To: jQuery Discussion Subject: Re: [jQuery] Close any other row before showing a new one Have to tried ':visible' selector? $('.hidden:visible').slideUp("fast"); - jake On 3/28/07, Alex Ezell < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: 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. /alex On 3/28/07, Andy Matthews < <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]> wrote: 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. This is what a row looks like: or I'm using slideToggle to open the row: $(child).html(data).slideToggle("fast"); and I've tried hiding them like so: $('.hidden').slideUp(); and $('.hidden').hide(); So I'm wondering, how can I get ONLY the ones that are open already? Andy Matthews Senior Coldfusion Developer Office: 877.707.5467 x747 Direct: 615.627.9747 Fax: 615.467.6249 [EMAIL PROTECTED] www.dealerskins.com <http://www.dealerskins.com/> ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Close any other row before showing a new one
Have to tried ':visible' selector? $('.hidden:visible').slideUp("fast"); - jake On 3/28/07, Alex Ezell <[EMAIL PROTECTED]> wrote: 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. /alex On 3/28/07, Andy Matthews <[EMAIL PROTECTED]> wrote: > 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. > > This is what a row looks like: > > or > > > I'm using slideToggle to open the row: > $(child).html(data).slideToggle("fast"); > > and I've tried hiding them like so: > $('.hidden').slideUp(); > > and > > $('.hidden').hide(); > > So I'm wondering, how can I get ONLY the ones that are open already? > > > * *** > *** * > *Andy Matthews > *Senior Coldfusion Developer > > Office: 877.707.5467 x747 > Direct: 615.627.9747 > Fax: 615.467.6249 > [EMAIL PROTECTED] > www.dealerskins.com > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Close any other row before showing a new one
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. /alex On 3/28/07, Andy Matthews <[EMAIL PROTECTED]> wrote: 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. This is what a row looks like: or I'm using slideToggle to open the row: $(child).html(data).slideToggle("fast"); and I've tried hiding them like so: $('.hidden').slideUp(); and $('.hidden').hide(); So I'm wondering, how can I get ONLY the ones that are open already? * *** *** * *Andy Matthews *Senior Coldfusion Developer Office: 877.707.5467 x747 Direct: 615.627.9747 Fax: 615.467.6249 [EMAIL PROTECTED] www.dealerskins.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Close any other row before showing a new one
If only one can be open at a time, then store its top level ID. When a new one is opened, close the existing one, open the new one and then update the stored ID value. On 3/28/07, Andy Matthews <[EMAIL PROTECTED]> wrote: 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. This is what a row looks like: or I'm using slideToggle to open the row: $(child).html(data).slideToggle("fast"); and I've tried hiding them like so: $('.hidden').slideUp(); and $('.hidden').hide(); So I'm wondering, how can I get ONLY the ones that are open already? * *** *** * *Andy Matthews *Senior Coldfusion Developer Office: 877.707.5467 x747 Direct: 615.627.9747 Fax: 615.467.6249 [EMAIL PROTECTED] www.dealerskins.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/