I\'m trying to get the value of two radio button groups using the jQuery syntax as given below. When the code below is run I get the value selected from the first radio butt
Your quotes only need to surround the value part of the attribute-equals selector, [attr='val'], like this:
[attr='val']
$('a#check_var').click(function() { alert($("input:radio[name='r']:checked").val()+ ' '+ $("input:radio[name='s']:checked").val()); });
You can see the working version here.