title: How to manipulate HTML within a jQuery variable?
body: <p>I am trying to manipulate the HTML stored within a jQuery variable. I want to do this manipulation before I write the variable to the document.</p>
  
  <p>So, I have a variable defined as:</p>
  
  <pre><code>var sighting = "&lt;div&gt;&lt;span class="feed_name"&gt;&lt;/span&gt;&lt;/div&gt;";
  </code></pre>
  
  <p>And I want to put "hello world" in the <code>span</code> element.  This is the part that I can't get to work:</p>
  
  <pre><code>$(sighting).("span.feed_name").html(name);
  </code></pre>
  
  <p>Then I write the 'sighting' variable to the page:</p>
  
  <pre><code>$(#sightings).append(sighting);
  </code></pre>
  
  <p>Which puts the HTML in the sighting variable into the <code>&lt;div id="sightings"&gt;&lt;/div&gt;</code> element on the page.</p>
  
  <p>Any help would be greatly appreciated!</p>
  
  <p>Thanks,</p>
  
  <p>Mark</p>