//locate the div before which you want to insert and then insert,
assuming they are ordered alphabetically
                $('div[id]').each(function(){
                                if ($(this).attr('id') > 'delta')
                                        $(this).before('<div id="delta"/>');
                });

I think there is no selector that will do the same, but  I may be
wrong.
On Dec 22, 12:32 pm, Tbone <95dak...@gmail.com> wrote:
> Great! Thanks...
> However, I'm more clueless than I should be...and didn't pose the
> complete question...
>
> I have the divs as shown above, how do I locate where <div
> id="delta"></div> would go?
> Obviously between gamma and epsilon, but I need to search the ids for
> the first (id > "delta").  Then I can use your insert to properly
> place it.  I assume I use a selector, but am not sure how to put it
> together.
>
> On Dec 22, 10:25 am, ksun <kavi.sunda...@gmail.com> wrote:
>
>
>
> > try this, it will insert gamma1 before epsilon.
>
> > $('#gamma~#epsilon').before('<div id="gamma1"/>');
>
> > I first used after(), but that didn't work, looks like $
> > ('#gamma~#epsilon') selects #epsilon.- Hide quoted text -
>
> - Show quoted text -

Reply via email to