jQuery insert a class on a node during a find().each() recurse?
<p>In the jQuery below, the highlight span is being inserted into the existing span, creating a nested span element. is it possible to amend the script so that it just adds a highlight class to the existing span, rather than creating a new span?
(<a href="http://stackoverflow.com/questions/5779691/jquery-dom-parser">props and thanks to justkt</a> for the example)</p>

<pre><code>var content = jQuery('#content').html();

// append to a div to make sure there's a top-level tag.
var html = jQuery("&lt;div&gt;&lt;/div&gt;").append(content).html();

// keywordList is a selector for a div containing spans of items representing the contents
jQuery(".my_related_kw").find("span").filter(function() {
    return html.indexOf(jQuery(this).html()) != -1;
}).each(function() {
    jQuery(this).html("&lt;span class='highlight'&gt;" + jQuery(this).html() + "&lt;/span&gt;");
});
</code></pre>
