<button>Click me to change input state</button>

<input type="text"value="insert some content...." />
input:disabled{
  cursor: not-allowed;
}
jQuery('button').click(function(){
  var state = jQuery('input').prop('disabled');
  var new_state = !state;
  jQuery('input').prop('disabled', new_state);
});
jQuery('input').val('hello Lali');
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js