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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:20:28+00:00 2026-05-24T19:20:28+00:00

We have some existing JavaScript for enabling/disabling a bunch of checkboxes. After upgrading from

  • 0

We have some existing JavaScript for enabling/disabling a bunch of checkboxes. After upgrading from JQuery 1.4.4 to 1.6.2, it stopped working. Here’s what the HTML looks like for each checkbox:

<li class="option_row">
  <input id="checked27" class="checkbox normal" type="checkbox" disabled="disabled" checked="checked">
    <label class="disabled" for="checked27">
      <span>Foo</span>
  </label>
</li>

The JavaScript to enable the checkbox is attached to a link (with class “enableCheckboxesLink”):

var checkboxes = $('.checkbox');
$('.enableCheckboxesLink').click(function() {
  checkboxes.attr('disabled', '').next().removeClass('disabled');
});

In other words, we attach JavaScript to the “enableCheckboxesLink” that finds all checkboxes (that is, all elements with the “checkbox” class) and removes the “disabled” attribute.

When I stop through the code in JQuery 1.6.2, I can see that the var “checkboxes” contains e.g. “input#checked27.checkbox”, which is the checkbox above. But when I execute the last line above, it only removes the “disabled” attribute from the label, not the checkbox. Why? Is this a bug in JQuery 1.6.2? It worked in JQuery 1.4.4 (that is, the code above enabled both the checkbox and the label).

  • 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-24T19:20:29+00:00Added an answer on May 24, 2026 at 7:20 pm

    You could use the following code which removes the disabled=”disabled” attribute by using the attr() method and setting disabled to false.

    var checkboxes = $('.checkbox');
    $('.enableCheckboxesLink').click(function() {
      checkboxes.prop('disabled', false).next().removeClass('disabled');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some existing code that retrieves data from a database using ADO.NET that
I'm working on key handling in Javascript. I have done some research and I'd
I have to analyse some existing Erlang code. Does anybody knows about a tool
Some existing web services I consume have methods that look something like this: List<Employee>
I am implementing NHibernate into an existing web application. However, we have some other
I have an existing database that has some testing data into and I'm interested
I have written a custom ErrorProvider which adds some functionality to the existing ErrorProvider
I have an existing ASP.NET 2.0 website, stored in Team Foundation Server 2005. Some
We have an existing certificate issuing application (C#, ASP.NET, JavaScript) that issues certificates to
I'm working on some JavaScript that will be embedded on other websites (think like

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.