[jQuery] Re: Remove DOM siblings after current item

2007-06-05 Thread Mario Moura
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 liblah 1/li li id=appendExtraAppointmentsblah 2/li liblah 3/li liblah

[jQuery] Re: Remove DOM siblings after current item

2007-06-05 Thread Emil Ivanov
var next = $('#appendExtraAppointments').next('li'); while (next.size() != 0) { next = $('#spc').next('li'); next.remove(); } Regards, Emil Ivanov On Jun 5, 5:02 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have the following DOM: ul liblah 1/li li

[jQuery] Re: Remove DOM siblings after current item

2007-06-05 Thread Brandon Aaron
All you need is general sibling combinator like this: $('#appendExtraAppointments ~ li').remove(); More info on the selector. http://www.w3.org/TR/2005/WD-css3-selectors-20051215/#general-sibling-combinators http://docs.jquery.com/DOM/Traversing/Selectors -- Brandon Aaron On 6/5/07, [EMAIL