Since you want to execute the text change and fadeIn after the
animation completes you need to use a callback...

$('.frame3').click(function(){
     $('#story, #word1').fadeOut('fast', function(){
          $('#story').text("lorem");
          $('#word1').text("ipsum");
          $('#story, #word1').fadeIn("slow")
     });
});

On May 14, 12:34 pm, illovich <illov...@gmail.com> wrote:
> I also tried
>
>               $(function(){
>
>                                  $('.frame3').click(function(){
>
>                                      $('#story').animate({ opacity: 'hide'}, 
> 'fast').css
> ('background-position' , '-0px -302px').animate({ opacity: 'show'},
> 'fast');
>                                          $('#word1').animate({ opacity: 
> 'hide'}, 'fast').text("I loved
> you").animate({ opacity: 'show'}, 'fast');
>
>                                  });
>        })
>
> And that didn't work either - even though the .text method is after
> the .animate method, it still happens first.   Frustrating!

Reply via email to