Lightweight jQuery Image Preload Plugin - Preload Images
File Size: | 3.43 KB |
---|---|
Views Total: | 1261 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |

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 failed.
Basic Usage:
1. Include the jQuery library and the JQuery Preload Images plugin at the bottom of the document.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript" src="jQuery.preloadImages.js"></script>
2. The javascript to preload an array of images with callbacks.
var imgList = ['img1.jpg','img2.jpg']; $(imgList).preloadImages(function(isSucceed,finishedCount,len,src){ // one image finished, succeed or failed ... },function(succeedCount,len){ // all images finished ... })
Change log:
2016-01-22
- parameters update
This awesome jQuery plugin is developed by ikamal. For more Advanced Usages, please check the demo page or visit the official website.