1/*jslint unparam: true, browser: true, indent: 2 */ 2 3;(function ($, window, document, undefined) { 4 'use strict'; 5 6 Foundation.libs.alerts = { 7 name : 'alerts', 8 9 version : '4.2.2', 10 11 settings : { 12 speed: 300, // fade out speed 13 callback: function (){} 14 }, 15 16 init : function (scope, method, options) { 17 this.scope = scope || this.scope; 18 19 if (typeof method === 'object') { 20 $.extend(true, this.settings, method); 21 } 22 23 if (typeof method !== 'string') { 24 if (!this.settings.init) { this.events(); } 25 26 return this.settings.init; 27 } else { 28 return this[method].call(this, options); 29 } 30 }, 31 32 events : function () { 33 var self = this; 34 35 $(this.scope).on('click.fndtn.alerts', '[data-alert] a.close', function (e) { 36 e.preventDefault(); 37 $(this).closest("[data-alert]").fadeOut(self.speed, function () { 38 $(this).remove(); 39 self.settings.callback(); 40 }); 41 }); 42 43 this.settings.init = true; 44 }, 45 46 off : function () { 47 $(this.scope).off('.fndtn.alerts'); 48 }, 49 50 reflow : function () {} 51 }; 52}(Foundation.zj, this, this.document));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.