diff options
author | Mark Otto <markdotto@gmail.com> | 2018-12-16 02:13:22 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2018-12-16 02:33:05 +0300 |
commit | ee72e7838df71e28825480e44b278453e092a64c (patch) | |
tree | 9fb6ff638b1c86df8ef7125c0cb76215fdf9736e /js/dist/toast.js | |
parent | ffd3402a923b19754b4735803f9f9580bc1c38a5 (diff) |
dist
Diffstat (limited to 'js/dist/toast.js')
-rw-r--r-- | js/dist/toast.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/js/dist/toast.js b/js/dist/toast.js index d6ceccaf1e..d6d01cb383 100644 --- a/js/dist/toast.js +++ b/js/dist/toast.js @@ -83,7 +83,8 @@ var ClassName = { FADE: 'fade', HIDE: 'hide', - SHOW: 'show' + SHOW: 'show', + SHOWING: 'showing' }; var DefaultType = { animation: 'boolean', @@ -130,6 +131,10 @@ } var complete = function complete() { + _this._element.classList.remove(ClassName.SHOWING); + + _this._element.classList.add(ClassName.SHOW); + $(_this._element).trigger(Event.SHOWN); if (_this._config.autohide) { @@ -137,7 +142,9 @@ } }; - this._element.classList.add(ClassName.SHOW); + this._element.classList.remove(ClassName.HIDE); + + this._element.classList.add(ClassName.SHOWING); if (this._config.animation) { var transitionDuration = Util.getTransitionDurationFromElement(this._element); @@ -198,6 +205,8 @@ var _this4 = this; var complete = function complete() { + _this4._element.classList.add(ClassName.HIDE); + $(_this4._element).trigger(Event.HIDDEN); }; |