SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Jan 2012
    Posts
    261
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Collapsing Database Displays

    Before I try to explain what I'm trying to do, let me show you an example -

    http://www.catalogueoflife.org/annua...ree/id/2339542

    The page displays a list of taxons (in this case, phyla) in a parent-child relationship, with the parent being animals (Animalia). If you click on a tiny box with a + sign, it displays that particular phyla's children. If you choose Chordata, it displays a list of children that include class Mammalia (mammals), and so on.

    Anyway, I'd like to do something similar on my website, which focuses on animals and plants. I already have PHP/MySQL queries that display each taxon's children. I'd just like to know how to make them display with the little boxes that expand and collapse the children, menu or whatever they're called.

    Thanks!

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,120
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    You'd normally do effects like that with JavaScript—such as with an accordion script: http://jqueryui.com/accordion/. However, that's not really the script you want in this case.

    I've moved this to the JavaScript forum, where someone will know of a script that does exactly what you want.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."


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
  •