I have 2 numeric input fields and the below runs when the user stops inputting. What I am doing is checking that input a number is not bigger than input b and if it is show error.
The issue is that calculation is not happening well. For instance it works if a is 200 and b is 100 but not if a is 200 and b is 5
Not sure why... so any help would be greatly appreciated.
$("#input_6_23, #input_6_24").on({
blur: function() {
var a = document.getElementById("input_6_23").value;
var b = document.getElementById("input_6_24").value;
if(a > b) {
alert(a is bigger than b);
}
}
});