title: jQuery - modify HTML string
body: <p>Could someone tell me how I can modify the html before I insert it into the document?</p>
  
  <p>This is an AJAX call:</p>
  
  <pre><code>url: "http://localhost/cart/public/admin/album",
  success: function(html) {
  </code></pre>
  
  <p>This is the result of the AJAX call:</p>
  
  <pre><code>&lt;div class="main-content slide-in"&gt;
      &lt;h1&gt;Create Album&lt;/h1&gt;
      &lt;div class="inner"&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>All I want to do is change the color of the <code>h1</code> tag. I have added this code</p>
  
  <pre><code>url: "http://localhost/cart/public/admin/album",
  success: function(html) {
      $(html).find('h1').css('color','red');
      $('aside').after(html);
  </code></pre>
  
  <p>However this has no effect. The jQuery selector does seem to be working though.</p>
  
  <pre><code>url: "http://localhost/cart/public/admin/album",
  success: function(html) {
      $(html).find('h1').css('color','red');
      console.log($(html).find('h1').length);
      $('aside').after(html);
  </code></pre>
  
  <p>Using <code>console.log</code> correct outputs 1. So it is finding the h1. For some reason though the css style isn't being applied.</p>
  
  <p>I am bit stuck. Am I missing a step?</p>