Hi Josh, don't try to reinvent the wheel here. Just use the jQuery <a href="http://docs.jquery.com/Traversing/add#expr">.add()</a> method:
var $divs = $('div#first,div#second'); ... $divs = $divs.add('div#third'); -- Bohdan Ganicky On Jan 10, 8:32 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote: > I'm having a devil of a time doing something that would seem to be pretty > basic. > > I have a jQueryobjectwith two elements, and I want to insert a new element > in between them - not altering the DOM, but just the jQueryobject. > > So if my original jQueryobjectlooks like this when logged in the console: > [ div1, div2 ] > > I want it ultimately to look like this, inserting newdiv manually: > [ div1, newdiv, div2 ] > > ????? > > -- Josh