Sha256: b8c3e4cbdd4cd3e12640928b9df055ec8a8734b2b319cab3e50ec02901f62177

Contents?: true

Size: 852 Bytes

Versions: 2

Compression:

Stored size: 852 Bytes

Contents

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

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

    version : '5.0.0',

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

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

    events : function () {
      $(this.scope).off('.alert').on('click.fndtn.alert', '[data-alert] a.close', function (e) {
          var alertBox = $(this).closest("[data-alert]"),
              settings = alertBox.data('alert-init');

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foundation-rails-5.0.2.0 vendor/assets/javascripts/foundation/foundation.alert.js
foundation-rails-5.0.1.0 vendor/assets/javascripts/foundation/foundation.alert.js