Bookmark Topic Watch Topic
  • New Topic

how to expand and hide multiple rows and in table using java script?  RSS feed

 
Nilesh Raje
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi Friends,

I am not able to collapse and expand multiple rows. Can some one explain me with example?

I want to create a table in following way.

1)when i click the heading of the first row
The remaining 2 sub rows should hide(Can we put this subrows in the table and hide the entire table of 2 subrows?)
2) when i click the heading of the next row
the remaining 4 subrows should hide(Can we put this subrows in the table and hide the entire table of 4 subrows?)

3) then when i click the heading of the next row
then remaining 2 subrows should hide(Can we put this subrows in the table and hide the entire table of 2 subrows?)

4) then when i click the heading of the next row
then remaining 2 subrows should hide(Can we put this subrows in the table and hide the entire table of 2 subrows?)



..!
It some thing like this

+Title 1
+Title 2
+Title 3
+Title 4

Now on clicking Title 1 i should see the following
- Title 1
--Sub Row1
--Sub Row 2

now on clicking Title 2 i should see the following
- Title 2
--Sub Row 1
--Sub Row 2
--Sub Row 3
--Sub Row 4

now on clicking Title 3 i should see the following
- Title 3
--Sub Row 1
--Sub Row 2

now on clicking Title 4 i should see the following
- Title 4
--Sub Row 1
--Sub Row 2

Thanks a ton..!
Nilesh
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!