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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:18:57+00:00 2026-05-24T21:18:57+00:00

Consider a simple .aspx page. There are sections in this page and each section

  • 0

Consider a simple .aspx page. There are sections in this page and each section has a header with a checkbox control. When selected it selects the other checkboxes that are within that section of the page. Think of it as a ‘Select All in This Section’ option as opposed to ‘Select All on the Page’. I’d like to do this via jQuery but can’t figure out how to keep all of the checkboxes from being selected as opposed to just those within that certain sub-section.

  • 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-05-24T21:18:57+00:00Added an answer on May 24, 2026 at 9:18 pm

    try some thing like this

    you can create wrapper div for ur header and sub_header like this

    <div class="header">
        <input id="xx" type="checkbox" /> Header #1
        <div class="sub_header">
            <input class="cc"  type="checkbox" />
            <input  class="cc"  type="checkbox" />
            <input  class="cc"  type="checkbox" />
        </div>
    <div>
    <div class="header">
        <input type="checkbox" /> Header #2
        <div class="sub_header">
            <input class="cc"  type="checkbox" />
            <input  class="cc"  type="checkbox" />
            <input  class="cc"  type="checkbox" />
        </div>
    <div>
    

    Then check if the header checkbox is selected, then select the sub_header in the next child div element, as follows

    $(document).ready(function(){
      $(".header input:checkbox").click(function(){
        if($(this).is(":checked")){
                $(this).parent("div.header").children("div.sub_header").find("input.cc").attr("checked","checked");
    }else{
                 $(this).parent("div.header").children("div.sub_header").find("input.cc").attr("checked",false);
         }
    });
    

    });

    I think u can shorten the jquery selector … check this

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

Sidebar

Related Questions

I'm designing an HTML page for display in Android browsers. Consider this simple example
Consider this simple Scala class: class A(val d: Int) Is there a difference in
Consider this simple PHP page: <?php $db = new mysqli(localhost, myuser, mypwd, mydb); if
Consider this simple program. The program has two files: File Vehicle.java class Vehicle {
Consider this simple class: package Foo; use Moose; has foo => ( is =>
Consider this simple model, where a Project has one ProjectType and, naturally many Projects
Consider this simple python code, which demonstrates a very simple version control design for
Consider a simple table with an auto-increment column like this: CREATE TABLE foo (
Consider this simple XML document. The serialized XML shown here is the result of
Consider this simple markup: <body> <div style=border: 2px solid navy; position:absolute; width:100%; height:100%> </div>

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.