Question: ```
<form class="responses">
    <input type="radio" name="choice" value="0">False</input>
    <input type="radio" name="choice" value="1">True</input>
</form>

```

Have tried: 

```
$('[name="choice"]').is(':checked'))

```

If either is checked it returns true, if neither is checked returns false, but I need to see which one is checked.

I am creating choices dynamically, and am not giving each an ID.

Answer: 
The following code will give the value of the checked radio button. If nothig is checked it will give undefined. Put this snippet inside a function and call the function on checking radio button

```
$("input[name='choice']:checked").val()

```
If you want to know the selected value use

```
$("input:radio[name='choice']:checked").val();

```

If you want to know which radio button is selected use

```
var radioButton = $("input:radio[name='choice']");
var selectedIndex = radioButton.index(radioButton.filter(':checked'));

```