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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:49:56+00:00 2026-05-25T00:49:56+00:00

jsFiddle: http://jsfiddle.net/KUcrm/ I have this code: HTML <input id=Check1 type=checkbox name=ckbRG tabindex=1 checked /><label

  • 0

jsFiddle: http://jsfiddle.net/KUcrm/

I have this code:

HTML

<input id="Check1" type="checkbox" name="ckbRG" tabindex="1" checked /><label for="Check1"> Check1</label><br />
<input name="txt1" type="text" maxlength="10" id="txt1" tabindex="2" />
<br /><br /><br />
<input id="Check2" type="checkbox" name="ckbNome" tabindex="3" checked /><label for="Check2"> Check2</label><br />
<input name="txt2" type="text" maxlength="10" id="txt2" tabindex="2" />

jQuery

$("#Check1").click(function() {
    if ($("#Check1").attr("checked")) {
        $("#txt1").removeAttr("disabled");
    } else {
        $("#txt1").attr("disabled", "disabled");
    }
});


$("#Check2").click(function() {
     if ($("#Check2").attr("checked")) {
         $("#txt2").removeAttr("disabled");
     } else {
         $("#txt2").attr("disabled", "disabled");
     }
    $("#Check1").click();
});

By selecting Check2, Check1 should also be selected but apparently the click event on Ckeck1 runs before the Check1 changes state (marked/unmarked). Then when the Check1 is checked txt1 is off and when not selected the txt1 is on.

  • 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-25T00:49:56+00:00Added an answer on May 25, 2026 at 12:49 am

    I think you want:

    $("#Check1").click().triggerHandler('click');

    http://jsfiddle.net/KUcrm/3/

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

Sidebar

Related Questions

I have the following code: http://jsfiddle.net/SPWWx/ I'm completely new to javascript, this is my
In this jsFiddle http://jsfiddle.net/littlesandra88/RBU8K/ have I the following code function addRemove(id) { alert(1); $('#'+id).toggle(function()
If you look at this JSfiddle http://jsfiddle.net/littlesandra88/G3N4m/ you will see that I have input
I have this script: http://jsfiddle.net/NV2uV/ It works, but I do not like it. Cons:
I have created this jsfiddle: http://jsfiddle.net/mfnxm/1/ I am trying to create this JSON: [{
I have the following code at JSfiddle: http://jsfiddle.net/ACG2D/ $(document).ready(function() { $('.testThis').click(function() { $('.regexValidation').each(function() {
var x = window.Something; alert(window.x) when i try this code in jsfiddle http://jsfiddle.net/XJEGU/ ,
I have this jsfiddle http://jsfiddle.net/fwQq4/19/ Here I have the wrapper class ( div.wrapper )
In this JSFiddle http://jsfiddle.net/JQ6qF/ have I striped down the problem. Try click on Save
In this jsfiddle http://jsfiddle.net/littlesandra88/eGRRb/ have I submit buttons that are auto-generated. Each table row

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.