I think I know what to do now. Thanks. Yes I have seen the accordian plug
in. Have you seen its demos? Its awful. John Resig's is much better.

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Glen Lipka
Sent: Thursday, August 02, 2007 8:40 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Show all?

 

Yes, you can use IDs and Classes at the same time.  In fact you can use
multiple classes too.
<div class="foo bar something else" id="totallyUnique"> is perfectly valid.
Each 'space-seperated' value in class is treated as additive classes. 

I am looking at the demo and it looks like it's working.  What doesn't work
right about it? 

Also, have you seen the accordion plugin?
http://bassistance.de/jquery-plugins/jquery-plugin-accordion/

Glen

On 8/2/07, Mitchell Waite < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

That helps a lot Glen but I am still stuck.

 

Here is my link

 

http://www.whatbird.com/wwwroot/Components/Accordion%20Menu.html 

 

Each of the items inside a main menu will open its own layer, you can see
the first two are working.

 

And excuse my confusion I should have called this "close all divs but one"
as it has nothing to do with "show all"

 

I don't think :last applies to the last DIV  clicked. 

 

In a DIV can I use an ID and a class at the same time? Because if that was
possible I could use addclass to hide all the divs with that class, then
show the one that is clicked (assuming I could make the close all happen
before the show)

 

I'm not using any tables, and all I know is if an object is visible or
invisible.

 

Thanks

 

Mitch

 

 

From: jquery-en@googlegroups.com [mailto:
<mailto:jquery-en@googlegroups.com>  [EMAIL PROTECTED] On Behalf
Of Glen Lipka
Sent: Thursday, August 02, 2007 7:30 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Show all?

 

Might be easier if you post an page that isn't working.  We could be more
specific.
However... 
Use a "class" when you want to refer to something that is repeated on the
page.
Also you can use :last to find the last one.
$("tr:last").show() would show the last row found. 

Does that help?

Glen

On 8/2/07, Mitchell Waite <[EMAIL PROTECTED]> wrote: 

What I am looking for is a way to hide the last one of these that was
clicked. I tried saving the object that was last used in a var but that
didnt work. I thought then maybe I could create some kind of "close all"
that would close all the other layers but not the one we have clicked to
show. 

           $('#Location').click(function() {  
         $("#attrname").css('background-color','#8FA9C5');    
         $("#attrtext").text("Location");    
         $("#location").show();    
         $("#shape").hide(); 
   });
   
       $('#Shape').click(function() {  
         $("#attrname").css('background-color','#8FA9C5')
         $("#attrtext").text("Shape");    
         $("#location").hide();      /* should hide location */
         $("#shape").show();
   });

 

 

Reply via email to