Try this:-
YOu are using .val
instead of .val()
.val always will return the function reference not the result of the function. So your statement will always be true.
$(document).ready(function () {
$(document).click(function () {
$('#test_button').prop('disabled', $('#type_here').val() === "");
}).keyup(function () {
$('#test_button').prop('disabled', $('#type_here').val() === "");
});
});