let counter = 0;
let delcounter = 0;
$('.addButton').click(function() {
if (counter >= 9) {
//console.log(counter);
} else if (counter == 9 && delcounter >= 1) {
$('.tableTicket').append($(controls));
counter++;
} else {
$('.tableTicket').append($(controls));
counter++;
}
});
$('.tableTicket').on('click', '.delButton', function(){
$(this).closest('.tableBody').remove();
delcounter++;
});
else if (counter == 9 && delcounter >= 1) {
$('.tableTicket').append($(controls));
counter++;
}