JSFiddle - React, Tailwind, and code Playground

HTML

<span id="loadNum">5566</span>

JavaScript

var switchToInput = function () {
        var $input = $("<input>", {
            val: $(this).text(),
            type: "text"
        });
        $input.attr("ID", "loadNum");
        $(this).replaceWith($input);
        $input.on("blur", switchToSpan);
        $input.select();
    };
    var switchToSpan = function () {
        var $span = $("<span>", {
            text: $(this).val()
        });
        $span.attr("ID", "loadNum");
        $(this).replaceWith($span);
        $span.on("click", switchToInput);
    }
    $("#loadNum").on("click", switchToInput);