I have a table output in Django from my DB into HTML. I want to make it so the width for my fields ajusts to the text size, i found some js here: Adjust width of input field to its input ...but when i paste the code to my .js files it doesnt change the fields at all on the page. this is my css code currently
table#infos td input {
width:4em;
}
table#infos td textarea {
width:6em;
height:2em;
}
and this is an eg of some of the html that isnt being changed properly
<tbody>
<tr>
<td>
<div class="resizing-input">
<span class="sort_value" style="display:none;">1</span>
<input id="id_form-0-id" min="0" name="form-0-id" type="number" value="1" />
</div>
</td>
<--etc--!>
the inputs id's are auto generated from the db column names etc the jquery i tried to use was from this http://jsfiddle.net/7pccrdbw/2/