/jQuery.preload

jQuery plugin for images preloading

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

jQuery.preload

jQuery plugin for images preloading.

Usage

Just include this script after jQuery. Requires jQuery 1.6+.

<script src="jquery.js"></script>
<script src="jquery.preload.js"></script>

Parameters

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. Use recursive: 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.

Examples

Translations

Документация на русском: http://htmlhero.ru/post/43234584604/jquery-preload