/*! lg-pager - v1.0.2 - 2017-01-22 * http://sachinchoolur.github.io/lightGallery * Copyright (c) 2017 Sachin N; Licensed GPLv3 */ (function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module unless amdModuleId is set define(['jquery'], function (a0) { return (factory(a0)); }); } else if (typeof exports === 'object') { // Node. Does not work with strict CommonJS, but // only CommonJS-like environments that support module.exports, // like Node. module.exports = factory(require('jquery')); } else { factory(jQuery); } }(this, function ($) { (function() { 'use strict'; var defaults = { pager: false }; var Pager = function(element) { this.core = $(element).data('lightGallery'); this.$el = $(element); this.core.s = $.extend({}, defaults, this.core.s); if (this.core.s.pager && this.core.$items.length > 1) { this.init(); } return this; }; Pager.prototype.init = function() { var _this = this; var pagerList = ''; var $pagerCont; var $pagerOuter; var timeout; _this.core.$outer.find('.lg').append('
'); if (_this.core.s.dynamic) { for (var i = 0; i < _this.core.s.dynamicEl.length; i++) { pagerList += '