Auto Increment width of an input tag
css, javascript, jquery
Solution
I think the best solution in this case would be not to use input tag, instead replace it with span tag. span is an inline element and the width will auto increment based on its content.
As i am moving to span, the jquery will change. and instead of `val()` we should use `text()`
Demo fiddle http://jsfiddle.net/ssxx8/11/
Problem
I am trying to code an counter. Here is my JsFiddle ``` $('.substract-value').click(function(){ val = $('#how-many').val(); if (val == 1) { } else $('#how-many').val(val-1); }); $('.add-value').click(function(){ val = $('#how-many').val(); $('#how-many').val(parseInt(val)+1); }); ``` I want the size of the input tag to auto-increment when the content inside the input tag will become 2digit or 3digit. is it possible only with css.