Is it possible to append to jQuery variable?
someting like this $($tnail).appendTo($collection);
I need to optimize costly DOM modifications and want to do it all at once.
something like this:
var $collection;
$.each(items, function (i, item) {
var $tnail = $("<div></div>");
$($tnail).appendTo($collection);
});
$($collection).appendTo("#Container");
$collectionshould be a jQuery object.