One way would be:

//setup tween
var tween = $('container').get('tween', {property: 'opacity', duration:
400});

//hide it by fading out, chain it to update div, and then show again
tween.start(0).chain(function(){

//update the faded div´s content
$('container').grab(....);

//show again
tween.start(1);
});


On Wed, Dec 10, 2008 at 3:46 PM, Oskar Krawczyk <[EMAIL PROTECTED]>
wrote:
>
> You can always delay the first chain:
>
> (function(){this.callChain()}.bind(this)).delay(300);
>
> On Dec 10, 2:23 pm, electronbender <[EMAIL PROTECTED]> wrote:
>> I'm trying to do the following:
>> Fade element out, replace it's HTML, and fade it in again.
>> So what better way to do this then chain, right?
>> Well apparently not.
>> I do it with chain, and there is some flickering when the element re-
>> appears, rather then have a smooth fade.
>> Is this happening because of both effects firing at the same time?
>>
>> Anyhow, here's the code:
>>                 var AnimChain = new Chain();
>>
>>                 AnimChain.chain(function(){
>>                         div.effect('opacity').start(1,0);
>>                         AnimChain.callChain();
>>                 })
>>
>>                 AnimChain.chain(function(){
>>                         div.setHTML(msg);
>>                         AnimChain.callChain();
>>                 })
>>
>>                 AnimChain.chain(function(){
>>                         div.effect('opacity').start(0,1);
>>                         dl.delay(3000);
>>                 })
>>
>>                 AnimChain.callChain();
>>
>>                 var dl = function(){
>>                         $('StatusInfoWin').effect('top').start(-30,-280);
>>                         div.remove();
>>                 }



-- 
◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦
Iván Núñez Paz | Comunica Online | Tel. 902 945 321
http://comunicaonline.net/

Reply via email to