website/public/js/modules/alert-box.js

19 lines
436 B
JavaScript
Raw Normal View History

2015-08-30 12:34:43 -04:00
(function() {
(function($) {
$.fn.alert = function() {
return this.each(function() {
var self;
self = $(this);
self.on('click', '.close-button', function(e) {
e.preventDefault();
self.addClass('close');
});
self.on('transitionEnd webkitTransitionEnd oTransitionEnd', function() {
self.remove();
});
});
};
})(jQuery);
}).call(this);