I have this code :
<script type="text/javascript">
$(document).ready(function() {
$('.trackInputHours').change(function() {
$(this).closest('.trackOn').nextAll('.trackOn').find('.trackInputHours').val($(this).val());
});
});
</script>
and I’d like to change the value (with val($(this).val())) only if the value for that element is ?? or less than the new value.
Is it possible with a sort of condition into the val() ? Or which strategy is better?
Use the
valcallback option.