Sha256: fbde7afb61e8ffd8ab9b717f0bed1e58cb9e0144a25cc773fea634d5554f62cd

Contents?: true

Size: 1.17 KB

Versions: 5

Compression:

Stored size: 1.17 KB

Contents

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

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

    version : '5.5.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() + '] .close', function (e) {
        var alertBox = S(this).closest('[' + self.attr_name() + ']'),
            settings = alertBox.data(self.attr_name(true) + '-init') || self.settings;

        e.preventDefault();
        if (Modernizr.csstransitions) {
          alertBox.addClass('alert-close');
          alertBox.on('transitionend webkitTransitionEnd oTransitionEnd', function (e) {
            S(this).trigger('close.fndtn.alert').remove();
            settings.callback();
          });
        } else {
          alertBox.fadeOut(300, function () {
            S(this).trigger('close.fndtn.alert').remove();
            settings.callback();
          });
        }
      });
    },

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

Version data entries

5 entries across 5 versions & 4 rubygems

Version Path
va_common-0.1.0 app/assets/js/foundation/foundation.alert.js
foundation_front_end-0.1.0 vendor/assets/javascripts/foundation/foundation.alert.js
paint-rails-0.7.24 vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.alert.js
foundation-rails-5.5.2.1 vendor/assets/javascripts/foundation/foundation.alert.js
foundation-rails-5.5.2.0 vendor/assets/javascripts/foundation/foundation.alert.js