When I click on the checkbox the banner (alert()) pop up.
But when I checked the checkbox with jQuery, the banner did not pop up.
How to make input tag trigger the onclick function when the checkbox is checked in jQuery? Or is there any alternative way?
Thanks in advance
<input type="checkbox" onclick="alert()" id="alert" checked>
$("#alert").prop("checked", true);
function alert() {
...something
}