I followed this example to capture an onChange() jQuery event for a radio button group: JQuery $(#radioButton).change(...) not firing during de-selection
But in my case, the solution given in that example is not working. I have the following generated from my JSP:
<input id="object.reportEntity.reportEntityIsPrime1" name="object.reportEntity.reportEntityIsPrime" type="radio" value="Y_YES" checked="checked"/>Prime <input id="object.reportEntity.reportEntityIsPrime2" name="object.reportEntity.reportEntityIsPrime" type="radio" value="N_NO"/>Not Prime JS:
$(document).ready(function() { // Display Alert on Radio Change $('input[name=object.reportEntity.reportEntityIsPrime]:radio').change(function () { alert('Radio Button clicked'); }); } The alert is not being diplayed. Also, there's this error:
Syntax error, unrecognized expression "input"