[ad_1]
I have some javascript alert code that displays a alert if a checkbox is not checked if a user tries to click on confirm button and it works fine on desktop but on mobile view/devices, it don’t work and I tried adding touchstart, touch, touchend into the javascript next to click but nothing seems to work when testing it on my mobile, my code is below if anyone can help please.
$(document).ready(function(){
$('#confirmcheckout').on('click touchend', function() {
if($('#terms-condition').prop('checked')==true) {
}
else {
alert("To proceed you must accept the terms.")
}
});
})
Thank you in advance
[ad_2]