I want to trigger an event not manually but by jQuery itself.
Here understand my problem better:
$('.commonCheck').change(function () {
if ($(".cashierCheck").attr("checked")) {
$('.cashierInput').fadeIn();
console.log("________________hr")
}
else{
$('.cashierInput').fadeOut();
console.log("_______________uncjecked")
}
}
My checkbox:
<input type="checkbox" name="cashierFilter" id="cashierFilter" class="cashierCheck commonCheck" class="mrL0" />
When I manually check/uncheck the checkbox the change event is triggered without any problem. But I want the event to be happened when I somehow execute this:
$('#cashierFilter').prop('checked','true');