Sha256: 9cad077a954e6522abbb89961a17601736c25208e4c2a5b96d56a6a6213fae52
Contents?: true
Size: 1.12 KB
Versions: 1
Compression:
Stored size: 1.12 KB
Contents
/*jslint unparam: true, browser: true, indent: 2 */ ;(function ($, window, document, undefined) { 'use strict'; Abstractio.libs.alerts = { name : 'alerts', version : '4.0.0', settings : { speed: 300, // fade out speed callback: function (){} }, init : function (scope, method, options) { this.scope = scope || this.scope; if (typeof method === 'object') { $.extend(true, this.settings, method); } if (typeof method != 'string') { if (!this.settings.init) this.events(); return this.settings.init; } else { return this[method].call(this, options); } }, events : function () { var self = this; $(this.scope).on('click.fndtn.alerts', '[data-alert] a.close', function (e) { e.preventDefault(); $(this).closest("[data-alert]").fadeOut(self.speed, function () { $(this).remove(); self.settings.callback(); }); }); this.settings.init = true; }, off : function () { $(this.scope).off('.fndtn.alerts'); } }; }(Abstractio.zj, this, this.document));
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
themepile-abstractio-4.1.7 | js/abstractio/abstractio.alerts.js |