3
Good afternoon guys, I need a help, I have the following condition, after clicking a button I must insert a new checkbox and the first of these checkbox has an id="0", the following must have id="1", id="2", so successively, 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"
});
Purely numerical id’s are not very good practice, so much so that in previous versions of html were not valid.
– Isac