<script>
$("input[name='my_radio_button']").change(function(){
if ($("input[@name='my_radio_button']:checked").val() == 'ONE'){
do_this_stuff();
} else { do_other_stuff(); }
});
</script>
<input type="radio" name="my_radio_button1" id="radio1" value="ONE" checked />
<input type="radio" name="my_radio_button2" id="radio2" value="TWO" />
(assume complete HTML and the script firing when all is ready)
The change event seems to fire when clicking to select a radio option, but not when the selection is changed with keyboard. Can anything be done about this?
edit - makes no difference if I use bind
or live
-- is this just a bug?
To clarify, the event does not fire even after focus is lost.
edit 2 - nobody knows the reason for this?
edit 3 - as DonaldIsFreak pointed out this seems to be a chrome problem