Sha256: 8e38bef2cbea3ec43e8de086ad0f73079662c3330d3eec2ace9029a5b8f6f4c2

Contents?: true

Size: 1.2 KB

Versions: 8

Compression:

Stored size: 1.2 KB

Contents

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

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

    version : '5.5.0',

    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').trigger('close.fndtn.alert').remove();
            settings.callback();
          });
        } else {
          alertBox.fadeOut(300, function () {
            S(this).trigger('close').trigger('close.fndtn.alert').remove();
            settings.callback();
          });
        }
      });
    },

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

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
catscope-0.1.0 assets/bower_components/foundation/js/foundation/foundation.alert.js
catscope-0.0.3 assets/bower_components/foundation/js/foundation/foundation.alert.js
catscope-0.0.2 assets/bower_components/foundation/js/foundation/foundation.alert.js
catscope-0.0.1 assets/bower_components/foundation/js/foundation/foundation.alert.js
foundation-rails-5.5.1.0 vendor/assets/javascripts/foundation/foundation.alert.js
pushnote-1.0.1 lib/pushnote/public/js/foundation/foundation.alert.js
pushnote-1.0.0 lib/pushnote/public/js/foundation/foundation.alert.js
foundation-rails-5.5.0.0 vendor/assets/javascripts/foundation/foundation.alert.js