Plugin API

Here is the basic structure of the lightgallery module.

(function($, window, document, undefined) {

    'use strict';

    var defaults = {
        fullScreen: true
    };

    var Fullscreen = function(element) {

        // You can access all lightgallery variables and functions like this.
        this.core = $(element).data('lightGallery');

        this.$el = $(element);
        this.core.s = $.extend({}, defaults, this.core.s)

        this.init();

        return this;
    }

    Fullscreen.prototype.init = function() {

    };

    /**
    * Destroy function must be defined.
    * lightgallery will automatically call your module destroy function 
    * before destroying the gallery
    */
    Fullscreen.prototype.destroy = function() {

    }

    // Attach your module with lightgallery
    $.fn.lightGallery.modules.fullscreen = Fullscreen;


})(jQuery, window, document);