build for v1
This commit is contained in:
parent
a47f00e7a1
commit
82ead23c3f
3 changed files with 8 additions and 6 deletions
10
dist/a-alert.js
vendored
10
dist/a-alert.js
vendored
|
|
@ -1,14 +1,16 @@
|
|||
'use strict';
|
||||
|
||||
/* global jQuery */
|
||||
|
||||
(function ($) {
|
||||
|
||||
$.fn.aalert = function (method) {
|
||||
if (methods[method]) {
|
||||
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
} else {
|
||||
$.error('Method ' + method + ' does not exist');
|
||||
return false;
|
||||
}
|
||||
|
||||
$.error('Method ' + method + ' does not exist');
|
||||
return false;
|
||||
};
|
||||
|
||||
var methods = {
|
||||
|
|
@ -87,7 +89,7 @@
|
|||
};
|
||||
|
||||
$('.alert [data-dismiss="aalert"]').click(function (e) {
|
||||
$element = $(e.target).closest('.alert');
|
||||
var $element = $(e.target).closest('.alert');
|
||||
methods.close.apply($element);
|
||||
});
|
||||
|
||||
|
|
|
|||
2
dist/a-alert.js.map
vendored
2
dist/a-alert.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/a-alert.min.js
vendored
2
dist/a-alert.min.js
vendored
|
|
@ -1 +1 @@
|
|||
"use strict";!function(t){t.fn.aalert=function(s){return e[s]?e[s].apply(this,Array.prototype.slice.call(arguments,1)):(t.error("Method "+s+" does not exist"),!1)};var e={changeTo:function(e){var s=t(this);return s.removeClass(function(t,e){return(e.match(/(^|\s)alert-\S+/g)||[]).join(" ")}),s.addClass("alert-"+e),this},changeContentTo:function(s){var a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t(this).find(".alert-content").html(s),!0===a&&e.open.apply(this),this},toggle:function(){var e=t(this);return e.hasClass("fade")?e.fadeToggle():e.hasClass("slide")?e.slideToggle():e.toggle(),this},close:function(){var e=t(this);return e.hasClass("fade")?e.fadeOut():e.hasClass("slide")?e.slideUp():e.hide(),e.hasClass("remove")&&e.remove(),this},open:function(){var e=t(this);return e.hasClass("fade")?e.fadeIn():e.hasClass("slide")?e.slideDown():e.show(),this},closeAfter:function(t){var s=this;return setTimeout(function(){e.close.apply(s)},t),this}};t('.alert [data-dismiss="aalert"]').click(function(s){$element=t(s.target).closest(".alert"),e.close.apply($element)}),t(".alert[data-timeout]").each(function(s,a){e.closeAfter.apply(a,[t(a).data("timeout")])})}(jQuery);
|
||||
"use strict";!function(t){t.fn.aalert=function(s){return e[s]?e[s].apply(this,Array.prototype.slice.call(arguments,1)):(t.error("Method "+s+" does not exist"),!1)};var e={changeTo:function(e){var s=t(this);return s.removeClass(function(t,e){return(e.match(/(^|\s)alert-\S+/g)||[]).join(" ")}),s.addClass("alert-"+e),this},changeContentTo:function(s){var a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t(this).find(".alert-content").html(s),!0===a&&e.open.apply(this),this},toggle:function(){var e=t(this);return e.hasClass("fade")?e.fadeToggle():e.hasClass("slide")?e.slideToggle():e.toggle(),this},close:function(){var e=t(this);return e.hasClass("fade")?e.fadeOut():e.hasClass("slide")?e.slideUp():e.hide(),e.hasClass("remove")&&e.remove(),this},open:function(){var e=t(this);return e.hasClass("fade")?e.fadeIn():e.hasClass("slide")?e.slideDown():e.show(),this},closeAfter:function(t){var s=this;return setTimeout(function(){e.close.apply(s)},t),this}};t('.alert [data-dismiss="aalert"]').click(function(s){var a=t(s.target).closest(".alert");e.close.apply(a)}),t(".alert[data-timeout]").each(function(s,a){e.closeAfter.apply(a,[t(a).data("timeout")])})}(jQuery);
|
||||
Loading…
Reference in a new issue