# Fade Out Image (Scotty's Example)

**URL:** https://forum.kirupa.com/t/fade-out-image-scottys-example/134423
**Category:** Uncategorized
**Created:** [January 18, 2005, 11:30am UTC](https://forum.kirupa.com/t/fade-out-image-scottys-example/134423 "2005-01-18T11:30:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![alwaysdrifting](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@alwaysdrifting](https://forum.kirupa.com/u/alwaysdrifting)
#### Post date: [January 18, 2005, 11:30am UTC](https://forum.kirupa.com/t/fade-out-image-scottys-example/134423/1 "2005-01-18T11:30:54Z")

</div>

Using an example that Scotty previously posted:

[Scotty’s Code](http://www.kirupa.com/forum/showthread.php?t=74950) (The attached example uses the same code but fades in an image)

When a thumb is clicked, the image fades in. I’m having trouble **fading out the current image when another thumbnail is pressed**?

If I call a fadeOut function when a thumbnail is clicked, **[COLOR=Blue]this[/COLOR]** refers to the image being loaded. How can I get the previous image to fade out before the next image fades in?

Thanks
