Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9140651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:32:39+00:00 2026-06-17T09:32:39+00:00

I love this functionality for large lists http://jquerymobile.com/demos/1.2.0/docs/lists/lists-nested.html I’m going to have a list

  • 0

I love this functionality for large lists http://jquerymobile.com/demos/1.2.0/docs/lists/lists-nested.html

I’m going to have a list with over 1,000 line items. I will have it categorized in to parent/child lists.

For example, the initial list that is presented is a list of states in the US. Once they click on a state, like California, they should see only the sub-list items of California.

I can’t find any code to do this outside of jquery mobile.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:32:40+00:00Added an answer on June 17, 2026 at 9:32 am

    So you want it to replace the list with the new one, or show in nested in the old one, I’d build it different for either case.

    If you want it to replace the old one I’d go with something like this (using ajax to load sub lists if it’s really large). http://jsfiddle.net/Cmzwe/

    HTML

    <ul id="main">
      <li id="wa">Washington</li>
      <li id="or">Oregon</li>
      <li id="ca">California</li>
    </ul>
    <ul class="hidden" id="wa-list">
      <li>Everett</li>
      <li>Seattle</li>
      <li>Olympia</li>
    </ul>
    <ul class="hidden" id="or-list">
      <li>Portland</li>
      <li>Salem</li>
      <li>Beverton</li>
    </ul>
    <ul class="hidden" id="ca-list">
      <li>Reding</li>
      <li>Modesto</li>
      <li>Stockton</li>
    </ul>
    

    CSS

    $('ul#main li').bind('click',function(){
      $('ul#main').addClass('hidden');
      $('ul#'+$(this).attr('id')+'-list').removeClass('hidden');
    });
    

    Javascript

    $('ul#main li').bind('click',function(){
      $('ul#main').addClass('hidden');
      $('ul#'+$(this).attr('id')+'-list').removeClass('hidden');
    });
    

    If you want it nested then I’d do it more like this. http://jsfiddle.net/pKAQ8/

    HTML

    <ul id="main">
      <li id="wa">Washington</li>
      <li id="or">Oregon</li>
      <li id="ca">California</li>
    </ul>
    <ul class="hidden" id="wa-list">
      <li>Everett</li>
      <li>Seattle</li>
      <li>Olympia</li>
    </ul>
    <ul class="hidden" id="or-list">
      <li>Portland</li>
      <li>Salem</li>
      <li>Beverton</li>
    </ul>
    <ul class="hidden" id="ca-list">
      <li>Reding</li>
      <li>Modesto</li>
      <li>Stockton</li>
    </ul>
    

    CSS

    ul.hidden{
      display:none;
    }
    ul.li{
      cursor:pointer;
    }
    

    Javascript

    $('ul#main li').bind('click',function(){
      $('ul#main').addClass('hidden');
      $('ul#'+$(this).attr('id')+'-list').removeClass('hidden');
    });
    

    This are both very basic examples, I can expand on either one if you’d like, just let me know how you want it to work.

    Obligatory Formatted Code, JSFiddle is easier for something like this.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On this test page: http:// www.onebagoneearth.com/ Products-test , where it says oboe love series,
I've started looking at jQuery's built-in tabs functionality here: http://docs.jquery.com/UI/Tabs Is there any way
So i have this ArrayList: list.get(0) == love list.get(1) == foo list.get(2) == make
I would love to get some tips from other people that have had this
How many times have we seen this type of selector: List Box Selector http://geekswithblogs.net/images/geekswithblogs_net/dotNETvinz/MoveItemsListBox.jpg
I love the autoload functionality of Ruby ; however, it's going away in future
I love this shortcut in borne shell, and want to find out if it
I love this widget in google closure, Zippy and I need an equevalent in
Hi i am new and i love this site I am learning javascript and
Whilst I'd love to solve this problem in python, I'm stuck in Delphi for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.