Tyler Cowan Tyler Cowan - 5 months ago 27
jQuery Question

.prop("enabled", true): not working

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.


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

Answer Source

Is enabled a thing? Try setting disabled to false instead.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download