Sha256: b8554f8f2ca928b35c47c03aa2a09a7e603821eebc1f010775dc5bcbe3298255
Contents?: true
Size: 1.49 KB
Versions: 54
Compression:
Stored size: 1.49 KB
Contents
/** * PinMap wrapper. * * @author Htmlstream * @version 1.0 * @requires * */ ;(function ($) { 'use strict'; $.HSCore.components.HSPinMap = { /** * * * @var Object _baseConfig */ _baseConfig: { responsive: true, popover: { show: false, animate: true } }, /** * * * @var jQuery pageCollection */ pageCollection: $(), /** * Initialization of PinMap wrapper. * * @param String selector (optional) * @param Object config (optional) * * @return jQuery pageCollection - collection of initialized items. */ init: function (selector, config) { this.collection = selector && $(selector).length ? $(selector) : $(); if (!$(selector).length) return; this.config = config && $.isPlainObject(config) ? $.extend({}, this._baseConfig, config) : this._baseConfig; this.config.itemSelector = selector; this.initPinMap(); return this.pageCollection; }, initPinMap: function () { //Variables var $self, config, collection; //Variables values $self = this; config = $self.config; collection = $self.pageCollection; //Actions this.collection.each(function (i, el) { //Variables var $this; //Variables values $this = $(el); $this.easypinShow(config); //Actions collection = collection.add($this); }); } } })(jQuery);
Version data entries
54 entries across 54 versions & 1 rubygems