i am still new to all the Javascript stuffs and i have to be honest that i have not yet experimented anything concerning my question.
I would like to know if there is a way or a plugin with jQuery to preloaded multiples images and call a function when the images are loaded?
You can use the
loadevent for images, but they have a number of cross browser issues (it depends on what platforms you’re targeting).If you don’t mind including a plugin, there is waitForImages, (disclaimer: written by me) which handles this relatively nicely. 🙂
You’d use it like…
If you don’t want to use jQuery at all, you can adapt the first example. If you’re only targeting modern browsers…
If you had to support old browsers…