HOw to use fadeIn and FadeOut in Jquery image chnage

Posted by Mirage on Stack Overflow See other posts from Stack Overflow or by Mirage
Published on 2010-04-30T04:24:04Z Indexed on 2010/04/30 4:27 UTC
Read the original article Hit count: 166

Filed under:

I am chnaging the image src onClick event like below

IF the hyperlink is clicked then i need to change the image in a div box

<div id="left_img">
     <img style="float: right;" src="/image/char.gif">
                    </div>

Jquery

$("#left_img").attr("src","http://www.abc.net/image/2_char.gif");

Now i want that instead of abrupt change of image there should fade out of old image and fadein of new image

How can i do that

© Stack Overflow or respective owner

Related posts about jQuery