How to check if a radio button is checked or not in jquery?

406 views Asked by At

I have 3 radio buttons. I want to add some events on the radio check. But I am not able to track it. Any suggestions? I think it's old jquery 1.1.24 and I can not update it for some reason.

jQuery('#myform form input[type="radio"]:eq(0)').prop('checked', true);

Somewhere, I can see those sort of code too.

1

There are 1 answers

2
Gen4ik On

Perhaps you can do:

function isChecked() {
    return ($('input[type=radio]:checked').size() > 0);
}