Does anyone know why my button is not being disabled when I am not typing in the textbox? Here is the code snippet:
$(document).ready(function () {
loadData();
function loadData(is_category) {
$(document).on('click', '.viewdetails', function () {
var html = '';
html += '<input type=text id="ConvoDetails">'<input type="submit" class="sendButton">';
},
$('.sendButton').prop('disabled', true);
$('#ConvoDetails').keyup(function () {
$('.sendButton').prop('disabled', this.value == "" ? true : false);
});
});