How to delegate these terms without clicks?

if ($("#check_mtrx_a").prop("checked")){ if ($('.matrix_a tr:first td').length >= 10){ $('.add_col').attr('disabled', 'disabled'); } } if ($("#check_mtrx_b").prop("checked")){ if ($('.matrix_b tr:first td').length === 10){ $('.add_col').attr('disabled', 'disabled'); } } 

    1 answer 1

     function DisableAddColumn() { if ($("#check_mtrx_a").prop("checked")){ if ($('.matrix_a tr:first td').length >= 10){ $('.add_col').attr('disabled', 'disabled'); } } if ($("#check_mtrx_b").prop("checked")){ if ($('.matrix_b tr:first td').length === 10){ $('.add_col').attr('disabled', 'disabled'); } } } $(document).ready(function() { DisableAddColumn(); }); 
    • It does not work. So far it turned out only with one (click) to run - Drop
    • @Drop Everything works. You wanted without clicks - there is not a single click in my code. - Igor
    • I can't say a word about a click. But then my conditions no longer want to work when adding new elements on the page. - Drop
    • @Drop - please work on the formulation of your question - Igor
    • Well, the main point is understood. Thank you - Drop