JSFiddle - React, Tailwind, and code Playground
by ChrisStanyon
HTML
<div class="inp" id="inpGangID">
<select id="comGangID" name="comGangID" size="1"></select>
<img id="chris" class="freeInput" src="img/freeInput.png" alt="Free Input" />
</div>
JavaScript
$(document).ready(function () {
$('img.freeInput').click( function() { changeToFreeInput(this) });
});
function changeToFreeInput(element) {
var myInput = $('<input/>', {
id: $(element).attr('id'),
value: $(element).attr('id'),
type: 'text'
});
$(element).parent().html(myInput);
}