🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

A lightweight easy to use jQuery plugin used to preload an array of specific images with a customizable preloading bar. Callback events are supported that allow you to do some cool stuffs when the load of images was finished, succeed, or fa

image-loading image-preload

Documentation

preloadImages

jQuery preloadImages

Online Demo: http://jsbin.com/AdacIfI/2

Usage:

$(['img1.jpg','img2.jpg']).preloadImages([allCallback(succeedCount,len) [,oneCallback(isSucceed,finishedCount,len,src), [urlPadding]]]); 

eg.

var imgList = ['img1.jpg','img2.jpg']; var urlPadding = 'http://my.custom.domain/'; $(imgList).preloadImages(function(succeedCount,len){     // all images finished ... },function(isSucceed,finishedCount,len,src){     // one image finished, succeed or failed ... },urlPadding) 

You May Also Like