Hi,

I'm trying to get a basic sequence of events to work:

1) User clicks a link
2) two divs (not containing the link) fade out
3) the contents of one div's text and the background properties of the
other get changed
4) both divs fade in again.

I've tried to effect this a couple of different ways, via chaining
(following an example at http://rhizohm.net/irhetoric/blog/88/default.aspx)
and just doing the things in order, and a couple other things. Nothing
seems to work, so I was hoping for some advice.

What I've been trying is here:  http://dev.illovich.com/storigraphi_sketch.html
- link two is totally broken atm.

In short, I've tried simple:

              $(function(){
         $('.frame2').click(function(){

                        $('#word1').animate({ opacity: 'hide'}, { duration: 10, 
queue:
true });
                     $('#story').animate({ opacity: 'hide'}, { duration: 100, 
queue:
true });


                        $('#story').css('background-position' , '-225px -0px');
                        changeText('#word','I wanted you');

             $('#story').animate({ opacity: 'show'}, { duration: 500,
queue: true });
                         $('#word1').animate({ opacity: 'show'}, { duration: 
500, queue:
true });
         });
     })

and functions:

(like)

                        function showThem(event)
                                {
                                         $('#story').animate({ opacity: 
'show'}, 'medium');
                                         $('#word1').animate({ opacity: 
'show'}, 'medium');
                                }

                        function changeThem(words, dims)
                                {
                                 $('#story').css(words);
                                 $('#word1').text(dims);

                                 showThem()
                                }

but in every case the text changes as soon as I click the link then
all the anaimations happen smoothly.

Can anyone offer any advice on the best way to accomplish this?

Thanks.

ill


Reply via email to