title: Move an element to another parent after changing its ID
body: <p>I have HTML like this:</p>
  
  <pre><code>&lt;span class="file-wrapper" id="fileSpan"&gt;
      &lt;input type="file" name="photo[]" id="photo" /&gt;
      &lt;span class="button"&gt;Click to choose photo&lt;/span&gt;
  &lt;/span&gt;
  </code></pre>
  
  <p>I want to extract the input field from there, change its ID and put it in an other div.</p>
  
  <p>How can I do that? If jQuery is needed that's okay, but if it can be without that would be great.</p>