JSFiddle - React, Tailwind, and code Playground
by ninadajnikar
HTML
This is how inputs look like:<br><br>
<input style="width:15px" id="testdata" type="text" value=""><br><br>
This is what I want to do with my input on page load (I'd love it to automatically change width as users type/delete data):<br><br>
<input type="text" size="69" value="Too long text. Too long text. Too long text. Too long text. Too long text. Too long text. ">
JavaScript
jQuery("#testdata").live("keyup",function(){
xwidth = $(this).width();
xwidth+=20;
$("#testdata").width(xwidth);
})