On Aug 20, 2007, at 2:11 PM, Klaus Hartl wrote: > > 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); >
Ha! Klaus, this is getting scary. :-) How many times do we post a virtually identical reply? More often than not, I think. Cheers, --Karl _________________ Karl Swedberg www.englishrules.com www.learningjquery.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery (English)" group. To post to this group, send email to jquery-en@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jquery-en?hl=en -~----------~----~----~----~------~----~------~--~---