title: Update multiple elements with html from jquery ajax call
body: <p>I have an AJAX call which returns multiple HTML fragments that need replacing on the page:</p>
  
  <pre><code>&lt;div data-replace="some-div"&gt;
    &lt;p&gt;whatever&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;div data-replace="some-other-div"&gt;
    &lt;p&gt;something else&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Currently I am adding all the html to a hidden div on the page and then doing:</p>
  
  <pre><code>    hiddenDiv.find('[data-replace]').each(function () {
          $('#' + $(this).data('replace')).html($(this).html());
          $(this).remove();
      });
  </code></pre>
  
  <p>which seems to work but seems a bit hacky. </p>
  
  <p>Is there a better way (whilst still returning HTML rather than JSON as this is out of my control)?</p>