How to convert an array of jQuery objects into a single object
<p><strong>I would like to convert an array of jQuery objects into a single jQuery objects with every element "after" the last created element:</strong></p>

<p>Test HTML:</p>

<pre><code>&lt;div id="test"&gt;asd&lt;/div&gt;
&lt;a&gt;&lt;/a&gt;
</code></pre>

<p>JS:</p>

<pre><code> var createElem = function(numElems) {
        var elems;
        for(var i=0; i&lt;numElems; i+=1) {
            elems.push($("#test").clone());
        }

        return elems;

    };

    $("a").append(createElem(20)); // fails because its an array and not a jQuery object
</code></pre>

<p>I know that I can create an element and put all of my clones inside of it:</p>

<pre><code> var createElem = function(numElems) {
        var elem = $('&lt;div&gt;');

        for(var i=0; i&lt;numElems; i+=1) {
            elem.append($("#test").clone());
        }

        return elem;

    };
</code></pre>

<p>But I would rather not deal with having to take out the elements from this parent wrapper before returning them.</p>
