jQuery logo

The syntax of jQuery code how to retrieve radio button items in cycle.  For example, you have radio buttons with names, first you need to get them to array. For this case I will do it manually.

var radios = [


To get any radio button item, you can use syntax $('input [type=radio]') or $('input:radio').

To get radio buttons with specified name, use the syntax: $('input [name=name_of_radio_group][type=radio]') or $('input[name=name_of_radio_group]:radio').

To get radio buttons by name in cycle, you can use the syntax like this:

for(q = 0; q< radios.length; q++) {
	$('input[name=radios[q]]:radio').css({'background-color' : '#000' });
	$('input:radio[name=radios[q]]').change(function() {
		//some action here