I want to make the alert appear if the number of infant is more than adults. I've tried but it looks like something went wrong. Please help.. thanks before
var button = $('#submit'),
adult = $('#adult option:selected').val(),
infant = $('#infant option:selected').val();
if(adult > infant) {
$("#alert").hide;
}
else if(adult == infant) {
$("#alert").hide;
}
else {
$("#alert").show;
}
Aucun commentaire:
Enregistrer un commentaire