How to replace such a part of the code - specific id - do disabled?

$("#3 *").prop('disabled',true); $("#4 *").prop('disabled',true); $("#5 *").prop('disabled',true); $("#6 *").prop('disabled',true); ..... 

    1 answer 1

    In jQuery, as in CSS, you can list selectors separated by commas:

     $('#1 *, #2 *, #3 *').prop('disabled',true); 

    You can also use the attribute selector if you have more specific ITDs:

     $('[id^="field"]>*').prop('disabled',true); // Установит disabled для всех непосредственных (первого уровня) потомков // всех элементов, чей id начинается с "field".