what's wrong with this jquery?
I have a radio button list with a name of "ReportTypeId". For each radiobutton I want to display an alert with its value when it's clicked. I wrote the following jQuery which gets all 5 radio buttons the list with a name of "ReportTypeId":
$("[name='ReportTypeId']").toArray().forEach(function(reportTypeId){
reportTypeId.click(function(reportTypeId){ alert(reportTypeId.value);});
});
When I set a breakpoint and examine tthe variables at load time the variables look as expected. However, when I click on a radio button after page load nothing happens. What I am doing wrong in the jquery above?