JSFiddle - React, Tailwind, and code Playground

by Timmy Willison

HTML

<button>Enable</button>
<input type="text" disabled="disabled" value="can't edit this" />

JavaScript

$("button").click(function () {
  $(this).next().removeAttr("disabled")
  .focus()
  .val("editable now");
});