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 8037241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:52:17+00:00 2026-06-05T02:52:17+00:00

I am looking for a jQuery widget that looks like the following: It allows

  • 0

I am looking for a jQuery widget that looks like the following: example

It allows you to have several groups for example:

Group 1
- Sub 1 1
- Sub 1 2
- Sub 1 3
Group 2
- Sub 2 1
Group 3
- Sub 3 1
- Sub 3 2

Clicking on Group 1 for example, will select everything inside, and clicking it again will deselect.
And also you should be able to collapse the groups for better navigation. Like seen in the image (the small arrow on the left side)

Is there a widget like this out there?

Thanks

  • 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-05T02:52:18+00:00Added an answer on June 5, 2026 at 2:52 am

    The JQuery:

    $(document).ready ( function () 
    {
        $('.parent').click(function () {
            var set = false;
            if ($(this).is(':checked'))
                set = true;
            $(this).parent().find('ul li').each( function () {
                var Input = $(this).find('input');
                Input.attr('checked', set);
            });     
        });
        $('span').click(function () {
            if ($(this).text() == '-')
                $(this).html('+');
            else
                $(this).html('-');
            $(this).parent().find('ul li').each( function () {
                $(this).slideToggle();
            });
        });
    });
    

    The html:

    <ul>
       <li>
          <span>-</span><input type="checkbox" value="a" class="parent" /> a
          <ul>
             <li><input type="checkbox" value="a1" /> a1</li>
             <li><input type="checkbox" value="a2" /> a2</li>
          </ul>
       </li>
       <li>
          <span>-</span><input type="checkbox" value="b" class="parent" /> b
          <ul>
             <li><input type="checkbox" value="b1" /> b1</li>
             <li><input type="checkbox" value="b2" /> b2</li>
          </ul>
       </li>
    </ul>
    

    Cheers

    EDIT: Added collapse.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking for a jQuery MultiSelect Widget that can handle thousands of items. Really like
I have been looking for a javascript (hopefully jQuery) timezone chooser/picker/control widget that I
Looking at this jQuery example, how can I modify the code so that it
I am looking for a widget/jquery plugin/hosted service or similar, that you can drop
I'm looking for a calendar widget kind of like the following: http://www.calendarlabs.com/online-calendar.php I wouldn't
I'm looking for a JavaScript menu bar widget that allows menu items to be
I'm looking into using the jQuery UI autocomplete widget to implement user lookup by
I've been looking around JQuery libraries for the URL hash, but found none that
I am looking for jQuery plugin that will open an html under an input
I was looking at the jQuery UI code, and I found that every file

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.