I have four RadioButtonList and I want to select input:radio from them. I use this code:
$("#<%=rblTipoviMKR.ClientID%> input:radio,#<%=rblTipoviMKD.ClientID%> input:radio,#<%=rblTipoviMKU.ClientID%> input:radio,#<%=rblTipoviMKV.ClientID%> input:radio").change(function (event) {
checkTipRadio($(this).val());
});
My question is, can I, and how, first set and on the end of selector put input:radio for all four RadioLists? Something like this:
$("#<%=rblTipoviMKR.ClientID%>,#<%=rblTipoviMKD.ClientID%>,#<%=rblTipoviMKU.ClientID%> ,#<%=rblTipoviMKV.ClientID%> input:radio").change(function (event) {
checkTipRadio($(this).val());
});
but this will select only radio:input for rblTipoviMKV,
You can use find() for that purpose:
However, a more readable solution would be to decorate your four
rblTipovielements with a specificclassattribute and match that class instead: