[jQuery] Re: Brain fade...how do you destroy a div?

2008-03-28 Thread Dan G. Switzer, II
>Sounds like an odd way to do it, just do > > $('#div').remove(); > > works with any DOM selection and it's chainable > > $('span').fadeOut().remove(); You'd really need to do: $('span').fadeOut(function (){ $(this).remove() }); To make sure you don't remove the element until

[jQuery] Re: Brain fade...how do you destroy a div?

2008-03-28 Thread Tamm Sjödin
Sounds like an odd way to do it, just do $('#div').remove(); works with any DOM selection and it's chainable $('span').fadeOut().remove(); Live long and prosper, Tamm Sjödin On Mar 27, 2008, at 6:22 PM, Gwyn Morfey wrote: mydiv.parentNode.removeChild(mydiv) works f

[jQuery] Re: Brain fade...how do you destroy a div?

2008-03-27 Thread Gwyn Morfey
mydiv.parentNode.removeChild(mydiv) works for me.. Gwyn Morfey http://gwynmorfey.com/ On Mar 20, 7:21 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm 99% sure this is really simple, but I just can't work it out... > > I have a collection of divs with unique IDs. On some event I need to