I want to know whether it is posible to have loader which will run till all the images in the page been loaded to the page . I have a website http://ranjoy.athost.net/ which is having some png large size images, i want all the images to load before the animation start .... plz help
Asked
Active
Viewed 173 times
0
-
Have you thought about loading the images that are not visible in the beginning on demand via AJAX? I think that would save a lot of loading tiime. – Daff Jun 28 '09 at 10:52
2 Answers
1
Have you tried this technique
http://www.filamentgroup.com/lab/update_automatically_preload_images_from_css_with_jquery/
Will do what you need.
0
If I'm understanding you right this would do the job
$( "img" ).ready(function(){
//code to start animation
});
edit: a callback is used and is called when all the images in the page have loaded. If you wanted to wait only until certain images have laoded you could try this
$( "img.anim" ).ready(function(){
//code to start animation
});
and give all your animation images a class of anim like this
<img src="whatever.png" class="anim" />

32423hjh32423
- 3,048
- 7
- 44
- 59