I am wanting to look at two fields and verify that only one field has a value. the code below is what I am using but it does not appear to work correctly.
any ideas or suggestions would be greatly appreciated.
//compare values for .miles and .gas
$(document).ready(function() {
$('.Submit').hide();
$('.miles input').on('blur change', function() {
if($('.miles input').val() > $('.gas select').val()) || ($('.gas input').val() > $('.miles select').val(){
$('.Submit').show();
} else {
$('.Submit').hide();
}
});
});
mileage == miles
Transportation == gas