Estevão Lucas wrote:
the way that i use is:$( "body" ).append("<div class='testDiv'></div>").find( ".testDiv" ); Thus the created element will be returned
I usually code that like the following to save one expensive search operation and code duplication like the class name:
var div = $('<div class="test"></div>').appendTo(document.body); --Klaus