I'm trying to set the time if the user clicks on a checkbox for "All Day Event". I've created a custom javascript file however, it's not updating the information. I'm not sure what's wrong.
$(function(){
function mf_custom_handler_1(){
var element_10_1_1 = $('#element_10_1').prop('checked');
if(element_10_1_1 == true){
$('#element_5_1').value = '12';
$('#element_5_2').value = '00';
$('#element_5_4').value = 'AM';
$('#element_6_1').value = '12';
$('#element_6_2').value = '00';
$('#element_6_4').value = 'PM';
}
}
$('#element_10_1').on('keyup mouseout change click', function() {
mf_custom_handler_1();
});
mf_custom_handler_1();
});```