jQuery insert a class on a node during a find().each() recurse?
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?
([props and thanks to justkt][1] for the example)

	var content = jQuery('#content').html();

	// append to a div to make sure there's a top-level tag.
	var html = jQuery("<div></div>").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("<span class='highlight'>" + jQuery(this).html() + "</span>");
	});


  [1]: http://stackoverflow.com/questions/5779691/jquery-dom-parser
jQuery insert a class on a node during a find().each() recurse?
===

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?
([props and thanks to justkt][1] for the example)

	var content = jQuery('#content').html();

	// append to a div to make sure there's a top-level tag.
	var html = jQuery("<div></div>").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("<span class='highlight'>" + jQuery(this).html() + "</span>");
	});


  [1]: http://stackoverflow.com/questions/5779691/jquery-dom-parser