In jquery 3.2.1 if I build checkbox after load function, click function don't work when I click checkbox.
If I build checkbox before for test, it's working!
How to code it for click function work after dynamic build checkbox in load function?
<div id="idcheckbox">
</div>
$(window).on('load', function () {
$("#idcheckbox").append("<div class='custom-control custom-checkbox custom-control-inline'><input type='checkbox' class='custom-control-input' id=" + identifiant + " value=" + url + "><label class='custom-control-label' for=" + identifiant + ">" + url + "</label></div>");
});
$(document).ready(function () {
$("input[type='checkbox']").on('change', function () {
alert("0000");
});
$("input[type='checkbox']").on('click', function () {
alert("1111");
});
});