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

  • Home
  • SEARCH
  • 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 7845703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:19:47+00:00 2026-06-02T17:19:47+00:00

There are 3 select boxes like below. I want to be able to use

  • 0

There are 3 select boxes like below. I want to be able to use jQuery toggle to display the select list items and hide the select list items. Is it possible using jQuery.closest() or jQuery.next()?

<dt><a href="#"><span>A - All</span></a></dt>            

        <dd>
        <ul>                          
            <li><a href="#">A<img class="flag"/><span class="value">A</span></a></li>
            <li><a href="#">B<img class="flag"/><span class="value">B</span></a></li>
            <li><a href="#">C<img class="flag"/><span class="value">C</span></a></li>
        </ul>                                                        
        </dd>

    </dl>


    <dt><a href="#"><span>A1 - All</span></a></dt>            

            <dd>
            <ul>                          
                <li><a href="#">A1<img class="flag"/><span class="value">A1</span></a></li>
                <li><a href="#">B1<img class="flag"/><span class="value">B1</span></a></li>
                <li><a href="#">C1<img class="flag"/><span class="value">C1</span></a></li>
            </ul>                                                        
            </dd>

    </dl>

        <dt><a href="#"><span>A2 - All</span></a></dt>            

                <dd>
                <ul>                          
                    <li><a href="#">A2<img class="flag"/><span class="value">A2</span></a></li>
                    <li><a href="#">B2<img class="flag"/><span class="value">B2</span></a></li>
                    <li><a href="#">C2<img class="flag"/><span class="value">C2</span></a></li>
                </ul>                                                        
                </dd>

    </dl>

Note: It can be done by adding classes specific to each anchor tag and the following ul tag, but that would be more code. I want to be able to keep it simple with less code!

  • 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-02T17:19:50+00:00Added an answer on June 2, 2026 at 5:19 pm
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <script src="Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                $('#menu > dd').hide();
                $('#menu dt').click(function () {
                    var objNext = $(this).next('dd');
                    if (objNext.is(':visible') === true) {
                        objNext.slideUp();
                    }
                    else {
                        $('#menu > dd').slideUp(); //( when A is clicked A,B,c show . now B is clicked now A1,B1,C1 show and hide A,B,C, ) else ( comment this line alone ).
                        objNext.slideDown();
                    }
                });
            });
        </script>
    </head>
    <body>
        <dl id="menu">
            <dt><a href="#"><span>A - All</span></a></dt>
            <dd>
                <ul>
                    <li><a href="#">A<img class="flag" /><span class="value">A</span></a></li>
                    <li><a href="#">B<img class="flag" /><span class="value">B</span></a></li>
                    <li><a href="#">C<img class="flag" /><span class="value">C</span></a></li>
                </ul>
            </dd>
            <dt><a href="#"><span>A1 - All</span></a> </dt>
            <dd>
                <ul>
                    <li><a href="#">A1<img class="flag" /><span class="value">A1</span></a></li>
                    <li><a href="#">B1<img class="flag" /><span class="value">B1</span></a></li>
                    <li><a href="#">C1<img class="flag" /><span class="value">C1</span></a></li>
                </ul>
            </dd>
            <dt><a href="#"><span>A2 - All</span></a> </dt>
            <dd>
                <ul>
                    <li><a href="#">A2<img class="flag" /><span class="value">A2</span></a></li>
                    <li><a href="#">B2<img class="flag" /><span class="value">B2</span></a></li>
                    <li><a href="#">C2<img class="flag" /><span class="value">C2</span></a></li>
                </ul>
            </dd>
        </dl>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to make an HTTP call updating some select boxes
There is a select dropdown and I want to add "No selection" item to
I'm wondering if the following may be possible using something like jQuery. I've looked
I currently have a HTML select box like below. <select name=item_1> <option value=0>Choose one...</option>
I am attempting to use a JQuery Mobile select menu without having to use
I would like to store the source for html select boxes in a configuration
I'd like to remove a specific option from some select boxes (all with the
jQuery documentation for change() says: For select boxes, checkboxes, and radio buttons, the event
I use something like below to pass information from one unbound form to another
I have jQuery UI dialog with ASP.NET. I wrap a list of check boxes

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.