Sha256: fac69f41be092d6ac7ce9b0c04087a7ab11e86bd775e2597e3dff4a2eec13e10

Contents?: true

Size: 1.21 KB

Versions: 9

Compression:

Stored size: 1.21 KB

Contents

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

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

    version : '5.2.2',

    settings : {
      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();
        if ('transitionend' in window || 'webkitTransitionEnd' in window || 'oTransitionEnd' in window) {
          alertBox.addClass("alert-close");
          alertBox.on('transitionend webkitTransitionEnd oTransitionEnd', function(e) {
            S(this).trigger('close').remove();
            settings.callback();
          });
        } else {
          alertBox.fadeOut(300, function () {
            S(this).trigger('close').remove();
            settings.callback();
          });
        }
      });
    },

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

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
woyo-server-0.0.9 public/server/foundation-5.2.2/js/foundation/foundation.alert.js
woyo-server-0.0.8 public/server/foundation-5.2.2/js/foundation/foundation.alert.js
woyo-server-0.0.7 public/server/foundation-5.2.2/js/foundation/foundation.alert.js
woyo-server-0.0.6 public/server/foundation-5.2.2/js/foundation/foundation.alert.js
woyo-server-0.0.5 public/server/foundation-5.2.2/js/foundation/foundation.alert.js
woyo-server-0.0.4 public/server/foundation-5.2.2/js/foundation/foundation.alert.js
woyo-server-0.0.2 public/server/foundation-5.2.2/js/foundation/foundation.alert.js
zurb-foundation-5-5.2.2 js/foundation/foundation.alert.js
foundation-rails-5.2.2.0 vendor/assets/javascripts/foundation/foundation.alert.js