SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Nov 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can i achieve this?

    I want to make a table with more than one level of nesting rows, each parent with a mark to expand the children of the next level. But only one "section" can be expanded at once, the other must collapse before so.

    I've left attached a pdf with the illustration.

    Can you help me? Thank you.

    table2.pdf

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,000
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Hi there,

    Welcome to the forums
    Depending on your level of JavaScript proficiency, maybe something like jExpand would help.
    This is a jQuery plugin that bills itself as "an ultra lightweight jQuery plugin that will make your tables expandable."

    If this more or less does what you need, I'm sure it wouldn't be too hard to add the additional functionality after that.

  3. #3
    SitePoint Member
    Join Date
    Nov 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, thank you for respond. I've tried jExpand but it didn't suit with i'm needing. It just works with 2 levels of nesting. I need to go beyond that.

  4. #4
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Dave,

    I'm still asleep, so bear with me..
    1) Are you looking to create the rows dynamically (from an array/object) or are they simply hidden?
    2) you want the first click on the "+" to open all "ST2" counties? and the 2nd click to open the towns?
    Where the World Once Stood
    the blades of grass
    cut me still


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •