Good afternoon, I need a help, I have the following condition, after clicking a button I must insert a new checkbox and the first of these checkboxes has an id="0", the next one must have id="1" id="2", so on, always after clicking the button that inserts a new checkbox. Example:
HTML
<input type="checkbox" id="0">
JS
$(document).on('click','.add',function(){
//acrescentar novo checkbox com id="1"
//acrescentar novo checkbox com id="2"
});