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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:44:33+00:00 2026-05-12T06:44:33+00:00

Let there be two – identical in terms of options – radio groups A

  • 0

Let there be two – identical in terms of options – radio groups A and B. I’m trying to guarantee, via jQuery, that if some option is selected in A, then it’s equivalent option is selected in B, and the other way around.

My current approach is this one:

$(document).ready(function() {
    $(".groupA > input").click(function() {
        $(".tutored-radio > input ").click();
     });

    $(".groupB > input").click(function() {
        $(".online-radio > input").click();
    });
});

Note: each radio button is inside a span. I didn’t assign the class directly to the input because it’s kind of hard to do it in an asp.net run-time generated ListItem.

The obvious problem being that it’s an infinite loop: it clicks an element and triggers the click action, which is to click it again, and so on…

What are your suggestions to this? I do have some ideas, but I didn’t mention them because I feel they’re too “hacky”, but will talk about them if it proves necessary.

Thanks in advance!

  • 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-12T06:44:33+00:00Added an answer on May 12, 2026 at 6:44 am

    rather than click try setting the arrtibute tag.

    $(document).ready(function() {
        $(".groupA > input").click(function() {
          $(".tutored-radio > input ").attr(”checked”, “checked”);
        });
    
        $(".groupB > input").click(function() {
          $(".online-radio > input").attr(”checked”, “checked”);
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say there are two python scripts that want to write data to the
Let's say that there are two PHP functions. function first() { $keyword = $this->input->post('keyword');
Let's say there are two modules that mutually use each other: package a; use
There are two tables with identical structure. Let's assume the number of rows in
We've come to a point where we've realised that there are two options for
Let's say that there are two people working on a git branch, they check
Let me begin by explaining what I'm trying to accomplish. Essentially there are two
Let's say there are two loaded buffers/files and they are both displayed via split
I've got a website, let's call it www.example.com In that website there are two
There are two classes, let's call them X and O. A number of elements

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.