[jQuery] Re: jquery beginner question: defer $('x').text('change') until after $('x').animate()

2009-05-14 Thread illovich
I also tried $(function(){ $('.frame3').click(function(){ $('#story').animate({ opacity: 'hide'}, 'fast').css ('background-position' , '-0px -302px').animate({ opacity: 'show'}, 'fast');

[jQuery] Re: jquery beginner question: defer $('x').text('change') until after $('x').animate()

2009-05-14 Thread Nikola
You're going to want to use callbacks... $('#word1, #story').fadeOut('fast', function(){ $(#word 1).text (lorem); $(#word).text(ipsum); $('#word1, #story').fadeIn (slow)}); $('.frame3').click(function(){ $('#story, #word1').fadeOut('fast', function(){ $('#story').text (lorem);

[jQuery] Re: jquery beginner question: defer $('x').text('change') until after $('x').animate()

2009-05-14 Thread Nikola
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,