How to enable/disable input in jQuery?

Disable input in jQuery:

$("#txtName").prop("disabled", true);

Enable input in jQuery:

$("#txtName").prop("disabled", false);

jQuery Demo: https://jsbin.com/noliqozigi/1/edit?html,output