Test Case Boilerplate
Fork this way...
JavaScript
// Simulate html comming from an AJAX request.
var current = $( "<body><div><ul><li>Test</li><li>Test</li></ul></div></body>");
// Find all tags. Select everything below <BODY>.
console.log( "All Tags: " + current.find( "*" ).length );
// Find a tag within the html.
console.log( "Find LI: " + current.find( "li" ).length );
// It doesn't like to find the div.
console.log( "Find DIV: " + current.find( "div" ).length );
// Append the data.
$( "body" ).append( current );
// Can be found correctly after being appended.
console.log( "Find after append DIV: " + $( document ).find( "div" ).length );