I am having trouble enabling a button. I have designed a small test https://jsfiddle.net/51xea2kb/ in order to test this functionality. I test whether a number is within a range and then enable or disable a button based on this number. I have checked multiple posts and nothing seems to apply.
Javascript
function enable(TVD) {
if (TVD >= 800 - 5 && TVD <= 800 + 5) {
$('#submitButton').prop("enabled", true);
} else {
$('#submitButton').prop("disabled", true);
}
}
$('#convert-table').click(function() {
var TVD = 800.1
enable(TVD);
});