JS Query Collapse / Expand Functionality

Recently someone answered the question about how to expand / collapse list. The attached code works great for expanding/collapsing lists within a list. I need to modify the code to display all nested lists within the 1st level. Example below for "Reports". When you click on reports I want the Local (Local 1, Local 2, Local 3) and State (Ohio, Pennsylvania) to ALL display. Is this something that is modified in the javascript (http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js) or in the script added to the code. Could someone give an example of where/what would be changed?

+  Documents
   •  Document 1
   •  Document 2
+  Reports
   •  Local
      o  Local 1
      o  Local 2
      o  Local 3
   •  State
      o  Ohio
      o  Pennsylvania
+  Links
   •  www.google.com
   •  www.bing.com
Code.txt
Malloy1446Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
GaryConnect With a Mentor Commented:
Give your top level UL a class e.g. top then change
Change
ul ul{
    display:none;  
}


to
.top>li>ul{
    display:none;  
}
0
 
Malloy1446Author Commented:
Sorry, I did not explain correctly. I want all lists collapsed when the page opens. Then if you click on one of the top level <ul> all the lists under will expand.
0
 
GaryCommented:
That's what should be happening
http://jsfiddle.net/Q5hqC/
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Malloy1446Author Commented:
My fault, I tried to put a comment with the style section and I think it negated the command. All is working correctly.

Thank you.
0
 
GaryCommented:
Don't forget to close the question if all is well
0
 
Malloy1446Author Commented:
Thanks for the help. I'm learning!
0
All Courses

From novice to tech pro — start learning today.