[jQuery] Re: remove() callback

2007-05-15 Thread Equand
yeah i managed that with a check on element existence. now it removes before appending, not appending before removing... the problem was simple... the remove() itself was called in a callback... On May 15, 2:50 pm, "Erik Beeson" <[EMAIL PROTECTED]> wrote: > Like I said before, when you call remov

[jQuery] Re: remove() callback

2007-05-15 Thread Erik Beeson
Like I said before, when you call remove, execution won't continue until remove is finished. There's no need for a callback. Could you maybe clarify the problem that you are having? I don't understand what this means: "on appending a span to a div the previous span removes, but now the div jumps

[jQuery] Re: remove() callback

2007-05-15 Thread Equand
On May 15, 1:58 pm, Sam Collett <[EMAIL PROTECTED]> wrote: > Missed a line ($this.remove()) > > On May 15, 11:10 am, Sam Collett <[EMAIL PROTECTED]> wrote:> You could save a > reference to its parent before hand, e.g. > > > $("a.removeme").click( > > function(e) > > { > >

[jQuery] Re: remove() callback

2007-05-15 Thread Sam Collett
Missed a line ($this.remove()) On May 15, 11:10 am, Sam Collett <[EMAIL PROTECTED]> wrote: > You could save a reference to its parent before hand, e.g. > > $("a.removeme").click( > function(e) > { > e.preventDefault(); > var $this = $(this), $parent

[jQuery] Re: remove() callback

2007-05-15 Thread Sam Collett
On May 15, 6:08 am, Equand <[EMAIL PROTECTED]> wrote: > but empty clears the element. and I need only to remove a particular > element... > if i use empty, i need to clear the parent. but there are some > elements in parent which should not be removed... You could save a reference to its parent b

[jQuery] Re: remove() callback

2007-05-14 Thread Equand
but empty clears the element. and I need only to remove a particular element... if i use empty, i need to clear the parent. but there are some elements in parent which should not be removed... On May 15, 7:00 am, "Erik Beeson" <[EMAIL PROTECTED]> wrote: > The empty() function is synchronis (sp?).

[jQuery] Re: remove() callback

2007-05-14 Thread Erik Beeson
err, you said remove, not empty. But the same thing is true. --Erik On 5/14/07, Erik Beeson <[EMAIL PROTECTED]> wrote: The empty() function is synchronis (sp?). It won't return until it's finished. --Erik On 5/14/07, Equand <[EMAIL PROTECTED]> wrote: > > is there any way to make a remove fun

[jQuery] Re: remove() callback

2007-05-14 Thread Erik Beeson
The empty() function is synchronis (sp?). It won't return until it's finished. --Erik On 5/14/07, Equand <[EMAIL PROTECTED]> wrote: is there any way to make a remove function with callback? so after removing an element a callback function starts?