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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:27:49+00:00 2026-06-17T10:27:49+00:00

So I recently asked a question on how to do this over at the

  • 0

So I recently asked a question on how to do this over at the other question I posted where I asked how to change some javascript to make it so that only if a particular check box was checked all check boxes would be disabled.

Well I wrote this:

$(function () {
    $("#disable").change(function () {
        $(this).siblings().attr("disabled", $(this).is(":checked"));
    });
});

and over here on jsfiddle you’ll see that it doesn’t work. The idea is, if you check the first checkbox, all the rest should become disabled. How ever it doesn’t…..

what am I doing wrong?

  • 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-17T10:27:50+00:00Added an answer on June 17, 2026 at 10:27 am

    you went wrong with the DOM. Check here: http://jsfiddle.net/83w8s/1/

    $(function () {
      $("#disable").change(function () {
        $(this).closest('.control-group').siblings('.control-group').find('input').attr("disabled", $(this).is(":checked"));
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Note: I originally asked this question about an hour ago but only recently realized
I recently asked this question https://softwareengineering.stackexchange.com/questions/129076/go-instead-of-c-c-with-cgo and got some very interesting input. However there's
I recently asked this question , but after some of the responses and some
I recently asked this question: Dynamically Query a Database to check for value And
This question is related to this other question I recently asked... cf.net exception and
I recently asked this question and worked out that the reason a single email
I recently asked this question: MS SQL share identity seed amongst tables (Many people
I was recently asked this question in an interview. Lets suppose I have 2000
I was recently asked this question : What is the difference between String and
Recently I was asked this question in an interview. I gave an answer in

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.