Sha256: a56212038bd5e1d7f5a56959791c596a14429144453aa315129c5d497e0c5c18

Contents?: true

Size: 962 Bytes

Versions: 41

Compression:

Stored size: 962 Bytes

Contents

;(function ($, window, document, undefined) {
  'use strict';

  Foundation.libs.alert = {
    name : 'alert',

    version : '5.1.1',

    settings : {
      animation: 'fadeOut',
      speed: 300, // fade out speed
      callback: function (){}
    },

    init : function (scope, method, options) {
      this.bindings(method, options);
    },

    events : function () {
      var self = this,
          S = this.S;

      $(this.scope).off('.alert').on('click.fndtn.alert', '[' + this.attr_name() + '] a.close', function (e) {
          var alertBox = S(this).closest('[' + self.attr_name() + ']'),
              settings = alertBox.data(self.attr_name(true) + '-init') || self.settings;

        e.preventDefault();
        alertBox[settings.animation](settings.speed, function () {
          S(this).trigger('closed').remove();
          settings.callback();
        });
      });
    },

    reflow : function () {}
  };
}(jQuery, this, this.document));

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
opsask-2.3.10 public/js/foundation/foundation.alert.js
opsask-2.3.9 public/js/foundation/foundation.alert.js
opsask-2.3.8 public/js/foundation/foundation.alert.js
opsask-2.3.7 public/js/foundation/foundation.alert.js
opsask-2.3.6 public/js/foundation/foundation.alert.js
opsask-2.3.5 public/js/foundation/foundation.alert.js
opsask-2.3.4 public/js/foundation/foundation.alert.js
opsask-2.3.3 public/js/foundation/foundation.alert.js
opsask-2.3.2 public/js/foundation/foundation.alert.js
opsask-2.3.1 public/js/foundation/foundation.alert.js
opsask-2.3.0 public/js/foundation/foundation.alert.js
opsask-2.2.3 public/js/foundation/foundation.alert.js
opsask-2.2.2 public/js/foundation/foundation.alert.js
opsask-2.2.1 public/js/foundation/foundation.alert.js
opsask-2.2.0 public/js/foundation/foundation.alert.js
opsask-2.1.9 public/js/foundation/foundation.alert.js
opsask-2.1.8 public/js/foundation/foundation.alert.js
opsask-2.1.7 public/js/foundation/foundation.alert.js
opsask-2.1.6 public/js/foundation/foundation.alert.js
opsask-2.1.5 public/js/foundation/foundation.alert.js