Hi,

I'm new to JQuery and used to use Scriptaculous. I would like to make
the following:

A function to fade out an image, then change the src of the image, and
once the new src is loaded, to fade in the image back (so that it's
fading in with the new image loaded).

Here is how I did it using Scriptaculous, however, the site will now
use jQuery and so I have to reproduce the same thing with it - is
there such a thing as "observe" in jQuery:
function navAction(newImg) {
  new Effect.Fade('image', {duration:0.5, afterFinish:function(){
    document.getElementById('image').src = 'images/' + newImg;
    $(document.getElementById("image")).observe('load', display);
  }
});
}

function display(event){
new Effect.Appear('image', {duration:1});
}

Reply via email to