Yeah, I've got it,

Thanks a lot


Glen Lipka wrote:
> 
> Use the fadeOut callback.
> http://docs.jquery.com/API/1.1/Effects#fadeOut.28_speed.2C_callback_.29
> 
> This will start a function when the animation for the fadeOut is finished.
> Then fadeIn the other one.
> 
> Glen
> 
> On Jan 14, 2008 10:22 PM, DeaR <[EMAIL PROTECTED]> wrote:
> 
>>
>>
>> $(function() {
>>
>>  $("#message_1").clone().removeClass("hidden").appendTo($("#message"));
>>        $("span.text1").click(function() {
>>
>>  $("#message").empty().html($("#message_1").clone().fadeIn("normal"));
>>                return false;
>>        });
>>        $("span.text2").click(function() {
>>
>>  $("#message").empty().html($("#message_2").clone().fadeIn("normal"));
>>                return false;
>>        });
>> });
>> From the script above, it works fine, but what I wanna do is to fade out
>> the
>> current element first, then the new element fades in afterwards. How to
>> work
>> it?
>>
>> Thank you
>> --
>> View this message in context:
>> http://www.nabble.com/How-can-I-switch-elements-by-fades--tp14832714s27240p14832714.html
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com
>> .
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-can-I-switch-elements-by-fades--tp14832714s27240p14874247.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to