$('#materials-form').append('<li>' + total + '</li>');
alert((total));
});}
And I try to check, whether a li is clicked in order not to be appended 2 times. So I declared a let value named hidden and I pass in there the value , or better the id value. The question is that , the length of that let var , does not increase or it remains always the same. It has a different behavior for different database records.I want the length of that value to increase by click in order not to append it again or if it is not clicked to append?