Checking if certain Radiobutton is checked

Checking if certain Radiobutton is checked

I've got the following code:
 
<input type="radio" runat="server" name="testGroup" id="test1" /><label for="<%=test1.ClientID %>" style="cursor:hand" runat="server">Test1</label>
<input type="radio" runat="server" name="testGroup" id="test2" /><label for="<%=test2.ClientID %>" style="cursor:hand" runat="server">Test2</label>
<input type="radio" runat="server" name="testGroup" id="test3" /> <label for="<%=test3.ClientID %>" style="cursor:hand">Test3</label> 

 
And then this to check if the 2nd radio button is checked:
 

return

$( '#test2' ).attr( 'checked' );

It's returning 'undefined' and I'm not sure why.