I have following buttons which is supply them values as per following:
$("#btnProduction").html('<span class="BtnsStyleText">Production (kWh):</span></br></br><span class="BtnsStyleValue">' + result[0].Production + '</span>');
$("#btnAvailability").html('<span class="BtnsStyleText">Availability (%):</span></br></br><span class="BtnsStyleValue">' + result[0].Availability + '</span>');
$("#btnCategoryA").html('<span class="BtnsStyleText">Category A Disabled Errors:</span></br></br><span class="BtnsStyleValue">' + result[0].ErrorDisabled + '</span>');
$("#btnFailedBatt").html('<span class="BtnsStyleText">Failed Battery Test:</span></br></br><span class="BtnsStyleValue">' + result[0].FailedBattery + '</span>');
$("#btnPowerConv").html('<span class="BtnsStyleText">Power Converter OFF:</span></br></br><span class="BtnsStyleValue">' + result[0].PowerConv + '</span>');
the 'result' contains numbers,could be 0,1,...when i click on this button according the number on top of them the give me further information in a grid and chart,now the thing is i want to make them unclickable if the value is zero, i can use :
$("buttons").attr("disabled", true)
but i should create condition one by one then it become messy as the page growth