The callback was going to be my next suggestion. That's weird...the method I
suggested should be working.
 
What happens when you take off the hide() call? Does it fade out just fine?

  _____  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Joan Piedra
Sent: Thursday, September 13, 2007 2:24 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: animate & hide


This should work.
msg.css("background-color","#faa").animate({'backgroundColor':'#fff'},
1000).hide();

If it doesn't, use the callback.
msg.css("background-color","#faa").animate({'backgroundColor':'#fff'}, 1000,
function(){ 
    // this is the callback
    $(this).hide();
})


On 9/13/07, Stefan Kilp [sk-software] <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote: 


it is certainly only a newbie problem ...

i try to set my message to red, animate it to white an the hide it 

        msg.css("background-color","#faa");
        msg.animate({'backgroundColor':'#fff'}, 1000);
        msg.hide();

but it will be hidden at once, without animating. 

if i remove

        msg.hide()

then the animation is shown.

any hint for me

thanks
stefan


--
Stefan Kilp
SK-Software, Entwicklung & Beratung

email: [EMAIL PROTECTED]

fon  : +49 6151 93344-0
fax  : +49 6151 93344-20
Herta-Mansbacher-Str. 98
64289 Darmstadt, Germany.
-----------------------------------------------------






-- 
Joan Piedra  ||  Frontend web developer
http://www.justaquit.com/  ||  http://www.joanpiedra.com/ 

Reply via email to