1(function ($) { 2 "use strict"; 3 4 $(document).on('change', '#mep_event_ticket_type_table .etp', function () { 5 let parent=$(this).closest('#mep_event_ticket_type_table'); 6 let max_qty_gq=parseInt($(this).closest('td').find('[name="mepgq_max_qty"]').val()); 7 let val=0; 8 9 parent.find('.etp').each(function (){ 10 val=val+parseInt($(this).val()); 11 }); 12 let max_qty=max_qty_gq-val; 13 14 if(max_qty<0){ 15 let new_value=parseInt($(this).val())-1; 16 $(this).val(new_value); 17 $(this).trigger('change'); 18 } 19 20 }); 21}(jQuery));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.