I'v been reading other answers about dynamically generated elements and event listeners but I still don't get how to do it with my case:
I appended a few check boxes to a list with:
$('#divId').append(...)
So the result is something like this:
<div id="divId">
<label><input type="checkbox" id="0"...> Element 0 </label>
<label><input type="checkbox" id="1"...> Element 1 </label>
.
.
.
</div>
Every element have a different id but i don't know how to add an event listener that listens to all the elements on that list. Something like:
$([ALL THE CHECK BOXES IDS]).change( function() {
if( $(this).is(":checked)"){
// do stuffs...
}
});