Using jQuery to replace an element including all the HTML tags
<p>Supposing I have the correct location of an element whats the best way to replace all the html including the tags of a given block of HTML code using jQuery()?  I'm looking to do something similar to the following.  Is this a good way to do this?  What other ways are available or useful to know about?</p>

<pre><code>var location = 'td[id^="A0.R0.Work"]';
var element = jQuery(location).prev();
element.html('&lt;h1&gt;some code&lt;/h1&gt;');
</code></pre>

<p>Thanks.</p>
