When you provide a context, you tell jQuery to find the element pinside that context, so your selector will look for a tag pthat is a child of the context.
If you add the container to the context, it will be able to find this element.
var jQueryObj = $("<div><p>testing</p></div>");
$('body').html($("p", jQueryObj).length);
<script src="http://code.jquery.com/jquery-2.2.0.js"></script>
Run codeHide result source
share