New to JQuery and I've searched the net for topics on traversing. However most discuss scenarios where you are traversing through the current document.
My case is I'll be receiving an html div string via AJAX. Let's say this div:
<div>
<ul>
<li id="myValue">HELLO</li>
</ul>
</div>
Let's say this string is stored in a variable myVar. How can I extract the li with id="myValue" and append it to another element on my current document. Most of the examples I see use $(#idHere). Can I do something like this? $(myVar).$("#myValue").appendTo($("#someOtherElement")?