The problem statement is simple. I need to see if user has selected a radio button from a radio group. Every radio button in the group share same id.
The problem is
Even input is not necessary as suggested by other answers. The following code can also be used:
input
var variable_name = $("[name='radio_name']:checked").val();