I need to do something like this:
<asp:RadioButton ID="rbDate" runat="server" Text="Date" GroupName="grpPrimary" />
and be able to check the value of the radio button's checked value in jQuery, but my attempts like these don't return true/false.
if ($('[name=rbDate]').attr("Checked"))
if ($('[name=rbDate]').attr("Checked").val())
if ($('[name=rbDate]:checked').val())
A little help?
This is probably the easiest way to do it. The *= searches the whole id attribute for rbDate which takes care of the whole ASP.NET id mangling.
$('input[id*=rbDate]').is(":checked");