How to change the radio button background color on selection?
$("input[type='radio']").click(function(e) {
$("input[type='radio']").css('background-color', '#ff0000');
});
I have tried this..But it doesn't work.
Its not working.I forgot to share my code
<fieldset data-role="controlgroup" id="custom-fieldset"> <span>Were you able to complete your visit today?</span><br/><input type="radio" id="radio_1134198__4516395" name="sdid_1134198" value="radio_1134198__4516395" /><label for="radio_1134198__4516395">Yes</label>
I got the results like this https://i.stack.imgur.com/SDGeZ.png . Radio button color has to be changed.
Working example: http://jsfiddle.net/Gajotres/qkCZY/
Version 1
HTML :
CSS:
Version 2
Working example: http://jsfiddle.net/Gajotres/hTY6k/
HTML :
CSS :
Final notes
If you want to find more about how to customize jQuery Mobile page and widgets then take a look at this article. It comes with a lot of working examples, including why is !important necessary for jQuery Mobile.