Why does this work?
$('#findme', '<div><div id="findme">Hello</div></div>')
And this does not?
$('#findme', '<div id="findme">Hello</div>')
For some reason only when I have the enclosing div will jQuery find the div with the id of findme.
Even enclosing it in a different tag does not work.
$('#findme', '<html><div id="findme">Hello</div></html>')
In addition the following don't work.
$('<div id="findme">Hello</div>').find('#findme')
$('<html><div id="findme">Hello</div></html>').find('#findme')
Although this works.
$('<div><div id="findme">Hello</div></div>').find('#findme')
There is something I'm not understanding about how the context works.
Thanks, Randall