Scregal

Install

A packaged source file includes everything you need to use Scregal.

Getting started

HTML

Scregal works on a container element with a group of elems.



Include the Scregal in your site with local file.

<script src="/path/to/jquery.scregal.min.js"></script>

or attach the Scregal using cdnjs:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.scregal/1.0/jquery.scregal.min.js"></script>

how to initialize:


var $container = $('#gallery-box'); //container must be a SINGLE jQuery object
var scregal = new Scregal($container); //with default options
var scregal = new Scregal($container, {
	//with your options
});

You can use a string as a selector but only for a SINGLE element

var scregal = new Scregal('#gallery-box'); //with default options
var scregal = new Scregal('#gallery-box', {
	//with your options
});

or:

var scregal = $('.gallery-box').scregal(); //with default options
var scregal = $('.gallery-box').scregal({
	//with your options
});

simple initialize in HTML:


Options set in HTML must be valid JSON.

get the Scregal instance:

var scregal = $container.data('scregal');