Sha256: 514a6374a15593a394e783cd8e255fdbf36a103351a59522c6ce528249482a68

Contents?: true

Size: 470 Bytes

Versions: 2

Compression:

Stored size: 470 Bytes

Contents

Plotline.Behaviors.Alert = {
  closeBtnClass: '.alert-close',

  initialize: function() {
    $(this.closeBtnClass).bind('click', (function(_this) {
      return function(event) {
        $(event.target).parent().hide();
        return event.preventDefault();
      };
    })(this));

    return setTimeout((function(_this) {
      return function() {
        return $(".flash").fadeOut(1000);
      };
    })(this), 3000);
  }
}

Plotline.Behaviors.Alert.initialize();

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
plotline-0.1.1 app/assets/javascripts/plotline/behaviors/alerts.js
plotline-0.1.0 app/assets/javascripts/plotline/behaviors/alerts.js