Thanks Emil, that solved my problem!

On Jun 5, 9:21 am, Emil Ivanov <[EMAIL PROTECTED]> wrote:
> I think the first won't remove anything since #appendExtraAppointments
> doesn't have any children.
>
> #appendExtraAppointments.sibligs() will wast all of the <li>s
>
> var next = $('#appendExtraAppointments').next('li');
> while (next.size() != 0) {
>         next = $('#appendExtraAppointments').next('li'); // <- had a
> typo here
>         next.remove();
>
> }
>
> On Jun 5, 5:09 pm, "Mario Moura" <[EMAIL PROTECTED]> wrote:
>
> > Not tested
>
> > $().remove($('#appendExtraAppointments').children());
>
> > or
>
> > $().remove($('#appendExtraAppointments').siblings());
>
> > Not sure,
>
> > Mario
>
> > 2007/6/5, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> > > I have the following DOM:
>
> > > <ul>
> > > <li>blah 1</li>
> > > <li id="appendExtraAppointments">blah 2</li>
> > > <li>blah 3</li>
> > > <li>blah 4</li>
> > > </ul>
>
> > > I would like to remove the li elements after the <li
> > > id="appendExtraAppointments">blah 2</li>.
>
> > > I tried doing something like this, but it didn't work:
>
> > > $('#appendExtraAppointments').siblings().not($('li').prev).remove();
>
> > > Any ideas?
>
> > > Thanks!
>
> > --
> > Mário Alberto Chaves Moura
> > [EMAIL PROTECTED]
> > 31-9157-6000

Reply via email to