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.
So, I have a variable
Try this:
var sighting = "", $elem = $(sighting).find("span.feed_name").text("hello world").parent(); $("#sightings").append($elem);
The parent call is needed to get back to the outer div.
parent
div