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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:45:11+00:00 2026-06-04T07:45:11+00:00

I haven’t found a post that actually asks about the moment a radio button

  • 0

I haven’t found a post that actually asks about the moment a radio button is selected.. I’m not checking for value, just if/when someone chooses any button.

Here’s what I have:

function turnSubmitBlue() {
$('.formSubmit').css('backgroundColor','#08aae4');
}

$('input:checkbox').each.change(function(){
if ($(this).attr('checked')) {
checkForThreeRadioBtns()
 };
});

function checkForThreeRadioBtns() {
        if (($('input[name=group1]:checked')) && ($('input[name=group2]:checked')) && ($('input[name=group3]:checked'))) {
            turnSubmitBlue();
            }
}

My thought process was, at page load, nothing is selected and I have to wait until one from each group is selected before indicating, by color change on the submit button, to submit. (I do have validation running if they hit submit before choosing one radio from each group).

Once there are three buttons selected, run the function to change Submit blue, display other content (already working just fine). Once they hit submit, the submit button goes gray and results are displayed.

At this point, there will always be three selected so I just need to then run a function the moment a change occurs (by clicking a different radio button) to change the submit button.

My function, checkForThreeRadioBtns() is supposed to make sure that one of each radio is selected in all three groups and if so, trigger the function to run turnSubmitBlue().

I’ve been trying to get jquery to check the moment a radio button is changed but no luck so far.

  • 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-04T07:45:12+00:00Added an answer on June 4, 2026 at 7:45 am

    Try like below,

    $('input:checkbox').change(function(){
       if (this.checked) {
         checkForThreeRadioBtns();
       };
    });
    

    Also try changing your if condition like below,

    if ($('input[name=group1]:checked').length && 
            $('input[name=group2]:checked').length && 
            $('input[name=group3]:checked').length)
    

    Complete Code:

    function turnSubmitBlue() {
        $('.formSubmit').css('backgroundColor','#08aae4');
    }
    
    $('input:checkbox').change(function(){
       if (this.checked) {
         checkForThreeRadioBtns();
       };
    });
    
    function checkForThreeRadioBtns() {
        if ($('input[name=group1]:checked').length && 
              $('input[name=group2]:checked').length && 
                $('input[name=group3]:checked').length) {
            turnSubmitBlue();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I haven't found any references to apps that use a custom activity indicator --
Actually haven't found the answer for this one. What for and why do i
I haven't found a question on this topic so I'll ask. I've never actually
Haven't seen anything about it here but it seems to solve one of the
I haven't found this question, feel free to close if it's already up here.
I haven't actually done this yet, and maybe I don't need to, but it
I haven't found any documentation on this or seen this done before, but is
Haven't seen anything, but I have seen that you can create albums in the
Haven't found what i'm looking for so far. I want to redirect all my
I haven't found a way to detect if user is currently viewing a page,

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.