Jquery fadeout function redraws old image

Posted by Mirage on Stack Overflow See other posts from Stack Overflow or by Mirage
Published on 2010-05-03T06:08:10Z Indexed on 2010/05/03 6:18 UTC
Read the original article Hit count: 194

Filed under:

I am using this function to fadeout the old image on click and then fade in new image

$("#left_img img").fadeOut(1000, function() {

    $(this).attr("src","/image/p2r.gif").fadeIn(500);

});

The problem is when first image is faded out then before the new image fades in , the first image loads again for 1 second and then new image fades in

© Stack Overflow or respective owner

Related posts about jQuery