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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:59:30+00:00 2026-05-29T09:59:30+00:00

I am using jQuery 1.4.3. I have a group of checkboxes like this: <input

  • 0

I am using jQuery 1.4.3.

I have a group of checkboxes like this:

<input type='checkbox' class="Product" value="5">
<input type='checkbox' class="Product" value="2">
<input type='checkbox' class="Product" value="3">

I am getting an element’s index like this:

$(".Product").click(function() {
    // GET PRODUCT DETAILS
    var Idx = $(this).index(".Product");
)};

If you click on the first checkbox, the value of Idx should be zero. If the second box is clicked, the value of Idx should be one. If you click on the third box, Idx will be two.

Now let’s say I want to uncheck the box that was just clicked using its index. How do I refer to an element by the value of its index?

$(".Product").click(function() {
    // GET PRODUCT DETAILS
    var Idx = $(this).index(".Product");
    alert('The index of the checkbox that was clicked was ' + Idx );

    // UNCHECK THE BOX THAT WAS JUST CHECKED -- NOT USING THIS
    $(".Product").index(Idx).attr("checked", false);


)};

This is the line that is incorrect and needs to be fixed:

    // UNCHECK THE BOX THAT WAS JUST CHECKED -- NOT USING THIS
    $(".Product").index(Idx).attr("checked", false);

Can you fix this?

  • 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-29T09:59:30+00:00Added an answer on May 29, 2026 at 9:59 am

    Perhaps try this:

    $('.Product').eq(Idx).attr('checked', false);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using jQuery UI's Droppable I have made a shelf type thing where the items
I have HTML like the following on my website: <div class=groups> <div class=group> Group
I have added a group of radio buttons dynamically to the DOM using jQuery.
I have this code & I've tired using JQuery's appendTo() function to get this
I have contact list which contains (checkbox,firstname,lastname,phone). I am creating this list using html
I'm using FluentValidation to validate input on an MVC form. I have a checkbox.
I have a radio group that allows the user (using jQuery events) to deselect
I have a JQuery (using JQuery 1.4.2) problem that exhibits only in IE8 in
Hey right now I'm using jQuery and I have some global variables to hold
using jquery v1.3.2 and jQuery UI 1.7.1 I have 1 tab control with 3

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.