|
[jQuery] Re: Removing element from DOM after animate: msg#02903jQuery
So is there a way I can execute the slide-fade effect, then remove the element from DOM after the animation? On Jul 31, 12:06 pm, waseem sabjee <waseemsab...@xxxxxxxxx> wrote: > here is a chain of animation > $(this).parents(".leftbox:first") > .animate({opacity: 0.5}, 350) > .animate({opacity: 0}, 350) > .remove(); > > you are actually chaining your events to occur one after the other on a > specific element or group of elements > > in the first piece of code you shared you. it would want to remove the > element as it animates, not after. > > On Fri, Jul 31, 2009 at 5:59 PM, bittermonkey <brakes...@xxxxxxxxx> wrote: > > > Please tell me why the remove() doesn't work from this call: > > $(this).parents(".leftbox:first").animate({height:"hide", > > opacity:"hide"}, 350, "", function(){$(this).remove()}); > > > while this one works: > > $(this).parents(".leftbox:first").animate({height:"hide", > > opacity:"hide"}, 350).remove(); > > > Thanks in advance.
|
|
||||||||||||||||||||||||||
|
|
|
| News | Mail Home | sitemap | FAQ | advertise |