I have a group of DropDownLists with a class of recur and I want to set their index conditionally in a function like this but it isn't working. I'm sure there must be a way of doing this?
function DisableFields(disable) {
if (disable) {
$('.recur').prop('disabled', true);
$('.recur').each(function (index, obj) {
obj.index(0);
});
} else {
$('.recur').prop('disabled', false);
}
}