suppose in a variable html is saved like
var vhtm="<div><div id='test'>zebra</div><div id='foo'>here is my many other html content</div></div>";
i want to parse the above html stored in variable with the help of jquery. i need to extract a particular div by id and including its content. the return result would like
<div id='foo'>here is my many other html content</div>
so i need to find div by id like id='foo'
please help me how to parse the above like jquery.