Monitoring when a radio button is unchecked

Handle the change event on the radio group, not each button. Then look to see which one is checked.

Here’s is some untested code that hopefully shows what I’m talking about :)…

$("input[name="type"]").change(function(e){
    if($(this).val() == 'history') {
        $year.css({display:'none'});
        $datespan.fadeIn('fast');
    } else {
        $datespan.css({display:'none'});
        $year.fadeIn('fast');
    }

});

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)