home
about
usage
settings
Usage
Installation
Add 2 scripts to your page:
<script src="js/libs/jsband-min.js"></script>
<script src="js/air-gallery-min.js"></script>
Now gallery is ready for use!
Create gallery
Create an empty DIV and give it an ID (e.g. "DIV_ID").
Create a gallery instance, indicating the DIV ID and settings:
var gallery = new AirGallery("DIV_ID",{
//settings
});
Put your images in some folder. Specify a path to this folder in the settings. Specify image list in the settings.
Done!
You can even create multiple gallery instances on your page.
When using on a web server, gallery can define image list automatically. This feature can be enabled in the settings.
Each setting has a default value and can be ignored. Here is a complete list of settings.
Replace gallery
Let's say your DIV already contains gallery.
Create a new instance of the gallery for the same DIV:
gallery = new AirGallery("DIV_ID",{
//new settings
});
A new instance will replace the old one.
Remove gallery
To remove a gallery instance, you should use a special method:
gallery.destroy();
It stops all animations, frees memory and removes everything related to gallery instance.
Resize gallery
"Air Gallery" is responsive (i.e., it resized automatically when you resize the browser window).
You can style your DIV using percentage units without worrying about gallery size.
However, you have the option to manually call the method:
gallery.resize();
It rebuilds gallery according to the size of your DIV.