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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:54:43+00:00 2026-06-16T01:54:43+00:00

Hello all Im stuck with some code hoping to get help. I have my

  • 0

Hello all Im stuck with some code hoping to get help. I have my html set up like so:

     <div class="menu_options">
           <div class="parent_options">
               <input type="checkbox" class="parent_required" />
           </div>
           <div class="children">
                 <div class="child_options">
                      <input type="checkbox" class="child_required" />   
                 </div>
                 <div class="child_options">
                      <input type="checkbox" class="child_required" />   
                 </div>
                 <div class="child_options">
                      <input type="checkbox" class="child_required" />   
                 </div>
           </div>
      </div>

Basically what im trying to do is in jquery if the parent_required class checkbox is checked get all the input fields under the children class and all input fields class by child_required uncheck them.

I cannot use id’ on the input fields because i just dont know all the id’s for the fields to use.

so far in jquery i have this code

      $('.parent_required').click(function() {

            if(!$(this).is(":checked")) {
                var child = $(this).parent('.parent_options').siblings('.children');

            }
        });

and im suck here at the div class=’children part dont know how to get deeper in.

  • 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-16T01:54:44+00:00Added an answer on June 16, 2026 at 1:54 am

    Try this:

    $('.parent_required').click(function() {
        if (!$(this).is(":checked")) {
            $(this).closest('.parent_options')
                .siblings('.children')
                .find('.child_required')
                .prop('checked', false);
        }
    });
    

    Example fiddle

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

Sidebar

Related Questions

Problem Hello all! I have this code which takes my jpg image loops through
hello i am stuck with jquery tablesorter: http://tablesorter.com/docs/index.html#Examples and would be grateful if some
Hello Fellow stackoverflowers, I´m stuck writing a piece of code. I have application with
VB.NET 2010, .NET 4 Hello all, I have a System.Timers.Timer object that does some
Hello all I am working on html and javascript.And I am going to ask
hello all i am working on a project in which i have a webpage
Hello all i'm turning objects on (adding the class .active) and off on a
hello all I have a small dialog which I created dynamically, which has a
hello all this seems to be my problem I have a table in mysql
Hello to all, Double d = 1.000000000000000000000000000000001; System.out.println(d); The code above prints 1.0 but

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.