I have a string that contains HTML, for example
var myString = "<div><p>testing</p></div>";
I need to target p
and replace "testing" with something else, say "Hello World". I would normally use
$("p").innerHTML = "Hello World";
However, this is part of a string, not part of the DOM. How can I use jQuery's selector system to select from a string of HTML?