jQuery plugin for images preloading.
Just include this script after jQuery. Requires jQuery 1.6+.
<script src="jquery.js"></script>
<script src="jquery.preload.js"></script>
There are two ways to use jQuery.preload. By passing url(s):
$.preload(images, [part], [callback]);
images
— image url(s), can be array and string.part
— how many images will be preloaded at one time.callback
— function to be executed after preload one part.
And using method:
$('#elem').preload([options], [callback]);
options
— object with properties. Userecursive: false
to prevent loading inner block images.callback
— function to be executed after preload all images.
In this case will be preloaded all images and backgrounds in the #elem
.
Документация на русском: http://htmlhero.ru/post/43234584604/jquery-preload