The following code does not return anything:
$('.foo', $('<div class="foo">foo</div><div class="bar">bar</div>').get(0)).html()
Is there any way to specify a string representation of xml/html as the context parameter of the jQuery function? I'm trying to select a section of an html document retrieved from an ajax request; the ajax callback (using $.get()
, for example) provides the returned data -- in this case html.