# Preload and fade-in function problem

**URL:** <https://forum.kirupa.com/t/preload-and-fade-in-function-problem/198737>\
**Category:** Uncategorized\
**Created:** [August 28, 2006, 7:27am UTC](https://forum.kirupa.com/t/preload-and-fade-in-function-problem/198737 "2006-08-28T07:27:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scarlac](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@scarlac](https://forum.kirupa.com/u/scarlac)\
**Post date:** [August 28, 2006, 7:27am UTC](https://forum.kirupa.com/t/preload-and-fade-in-function-problem/198737/1 "2006-08-28T07:27:55Z")

</div>

Hi

I created 2 functions:

- 1 for preloading my image
- and another 1 after the image is loaded to fade that image in.

But i’m having trouble converting it to a function that is usable for more than 1 image. So I don’t have to retype the code every time.

Can some1 help me with it.
