input text width auto size with it's content
<p><a href="https://i.stack.imgur.com/zyW1n.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zyW1n.png" alt="enter image description here"></a></p>

<p>Hello, i have table with lot of td, is it possible to autosize it's column depend on content length? <code>width: 100%</code> only autosize to it's td, not the content.</p>

<pre><code>$('input[type=text]').on('keyup', function () {
    $(this).attr('size', this.value.length);
}).trigger('keyup');
</code></pre>

<p>i used this script, but it's not work when i add class <code>form-control</code> from bootstrap. when i remove <code>form-control</code> class it working like this</p>

<p><a href="https://i.stack.imgur.com/q4yrX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q4yrX.png" alt="enter image description here"></a></p>