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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:31:00+00:00 2026-06-08T04:31:00+00:00

I have three radio buttons which have the same theme in jquery. If I

  • 0

I have three radio buttons which have the same theme in jquery. If I select one of them, the color of the button will change to the color specified in my .ui-btn-active class in the css. My radio buttons are named Can meet, not sure and Decline. I want my Decline radio button to have a different color than the two others when it is selected (the color red).

I’m using Jquery mobile and have customized the css for which colors I want to have on the different themes and I have changed the .ui-btn-active to .ui-btn-active-a and .ui-btn-active-b and made them with different values. I have tried to switch between the two ui-btn-active classes without no luck, and I have tried the addClass(..) and removeClass(..) without luck. I made a method in my jquery-mobile.js which look like this:

 $.mobile.changeAction = function( activeBtn){
    $.mobile.activeBtnClass = activeBtn;
} 

where my activeBtn parameter will be a string to choose which activeBtnClass I want to have. I think the problem is that I have problems refreshing the activeBtnClass after overriding it, I have tried some refreshing methodes without no luck.

As long as the radio buttons have different colors when active I will be very thankful.

  • 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-08T04:31:02+00:00Added an answer on June 8, 2026 at 4:31 am

    Following styles should do the trick:
    Screenshot1 Vertically stacked

    .ui-radio:nth-child(1) .ui-icon-radio-on.ui-icon{
        background-color:green;
    }
    .ui-radio:nth-child(2) .ui-icon-radio-on.ui-icon{
        background-color:grey;
    }
    .ui-radio:nth-child(3) .ui-icon-radio-on.ui-icon{
        background-color:red;
    }​
    

    Sample jsfiddle.

    To style Horizontally stacked select options:

    Screenshot2 Horizontally stacked

    .ui-radio:nth-child(1) .ui-radio-on span.ui-btn-inner{
        background-color:green;
    }
    .ui-radio:nth-child(2) .ui-radio-on span.ui-btn-inner{
        background-color:grey;
    }
    .ui-radio:nth-child(3) .ui-radio-on span.ui-btn-inner{
        background-color:red;
    }​
    

    Sample jsfiddle.

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

Sidebar

Related Questions

I have a group of three radio buttons. Depending on which radio button is
I have three radio buttons with same name and different values.When I click the
I have the following code in jQuery for a set of radio buttons which
I have three radio buttons, let's call them R1, R2 and R3. (R1 is
I have 2 radio buttons no one of them checked by default and I
I have three radio buttons in my Oracle form. Ideally, selecting one option would
I have some radio buttons on which I have applied css to align them.
I have some jQuery code that highlights which radio button is checked by turning
I have a HTML form, which includes radio buttons that the user can select
In my page I have three radio buttons and I want to checked the

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.