jQuery Plugin To Handle Preloading Of Images - addImage

File Size: 3.83 KB
Views Total: 981
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Plugin To Handle Preloading Of Images - addImage

addImage is a super small jQuery plugin that preloads an array of images and places them into the webpage where needed.

How to use it:

1. Place the JavaScript file addImage.min.js after loading jQuery library.

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="addImage.min.js"></script>

2. Call the function addImage() function and specify an array of images you'd like to preload.

$('[data-images]').addImage('1.jpg,2.jpg,3.jpg');

3. Create a container in which you want to place the images.

<div id="gallery" data-images></div>

This awesome jQuery plugin is developed by mattpoole08. For more Advanced Usages, please check the demo page or visit the official website.