Yes, it is possible, but you need to make a jQuery object out of it first.
Change this line:
alert (results.find("div[id='content']").html());
to this:
alert ( $(results).find("div[id='content']").html() );
or, better yet, to this:
alert ( $(results).find("#content").html() );
EDIT:
Looks like if the element you want is a direct child of body
, you'll need to use .filter()
instead since the body
seems to be excluded from the jQuery object. Looks like just its contents are included.
alert ( $(results).filter("#content").html() );
patrick dw
2010-06-24 13:26:07