I have an external Javascript and I want to enable a button when the table is not empty.
But I cannot seem to make it work.
This is my code:
$(function(){
var rowCount = $('#uploadsTable tbody tr').length;
if(rowCount != 0){
document.getElementById("finalizeButton").disabled = false;
}
});
$("#finalizeButton").prop('disabled', false)instead ofdocument.getElementById("finalizeButton").disabled = false