title: How to change value in html loaded with jQuery?
body: <p>Upon clicking a button, I load some extra html in my site, which I keep in a different file. After loading it, I want to make some changes in the loaded html. I currently try to do this as follows:</p>
  
  <pre><code>$.when($("#divForInsert").load("/toInsert.html")).done(function(){
      $("#someInput").val("new text in it");
  });
  </code></pre>
  
  <p>The contents of the file are as follows:</p>
  
  <pre><code>&lt;input type='text'
     size='5'
     id='someInput'
     name='someInput'&gt;
  </code></pre>
  
  <p>I am sure that <code>#someInput</code> exists (checked it in <code>toInsert.html</code> and with inspect element in the browser) and since I load it using .done(), I suppose it's already loaded when I try to change the val of it. So why does it refuse to be changed?</p>
  
  <p>All tips are welcome!</p>
  
  <p>[EDIT]
  I incorrectly said it was a div I tried to change, but it was actually an input field. I added it to the question.</p>