[jQuery] get the index of an element within a group

[jQuery] get the index of an element within a group


hi, all
I would like to find the index of a checked radio button. Is there a
better way to do than what I did as followings?
var radio = $('input[name=click2_sel]');
var curr_index = radio.index(radio.filter(':checked'));
Thank you!
Jack