Programmatically Setting Number Input Value Not Working
<p>I have a piece of javascript that sets the number input value. However, it won't work. The input's value field is still empty after the call (although console.log() outputing the element's val() does show the correct value). I have tried setting the value three ways jQuery's .val(total), .attr('value', total), and with plain old .value =, and still nothing. I even replaced the entire element with html and the value concatenated into the value attribute, and it won't work.</p>

<p>Any ideas why this won't take?</p>

<p>Here's the markup:</p>

<pre><code>&lt;div id="proposal_price_box"&gt;
  &lt;div class="proposal_price_header sys_bkgcolor"&gt;
    &lt;span class="title"&gt;&lt;h3&gt;Price to Appear on Proposal&lt;/h3&gt;&lt;/span&gt;
  &lt;/div&gt;
  &lt;div class="inner"&gt;
    &lt;span class="label"&gt;$&lt;/span&gt;
    &lt;input type="number" class="amount-input" id="proposal_price" value=""/&gt;
  &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>And the pertinent javascript:</p>

<pre><code>$('#proposal_price').val('1234');
</code></pre>

<p>Jsfiddle demonstrating the problem below.</p>

<p><a href="http://jsfiddle.net/n8z9K/12/" rel="nofollow">http://jsfiddle.net/n8z9K/12/</a></p>

<p>Somehow, if the element's container is displayed, it will set the value. But as soon as its hidden again, it breaks.</p>

<p><strong>EDIT</strong> Sorry, I didn't properly demonstrate the problem in JSfiddle. I am trying to clone the contents of the container and place it elsewhere. I've updated the jsfiddle to better show the issue.</p>
