diff options
| author | fat <[email protected]> | 2015-05-07 17:07:38 -0700 |
|---|---|---|
| committer | fat <[email protected]> | 2015-05-07 17:14:38 -0700 |
| commit | 660505188241418ffda53b5eb848defecd5f57e1 (patch) | |
| tree | ec0895cb5267cc798f386f96caca653a7fe191f1 /js/src/alert.js | |
| parent | c3a79b1a8c2fa8d7fc8edcd3e626dad8b45d5dc3 (diff) | |
| download | bootstrap-660505188241418ffda53b5eb848defecd5f57e1.tar.xz bootstrap-660505188241418ffda53b5eb848defecd5f57e1.zip | |
button -> es6
Diffstat (limited to 'js/src/alert.js')
| -rw-r--r-- | js/src/alert.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/js/src/alert.js b/js/src/alert.js index d69ad8910..67a1ceda4 100644 --- a/js/src/alert.js +++ b/js/src/alert.js @@ -8,7 +8,7 @@ import Util from './util' * -------------------------------------------------------------------------- */ -const Alert = (() => { +const Alert = (($) => { /** @@ -58,6 +58,8 @@ const Alert = (() => { // public close(element) { + element = element || this.element + let rootElement = this._getRootElement(element) let customEvent = this._triggerCloseEvent(rootElement) @@ -167,12 +169,12 @@ const Alert = (() => { $.fn[NAME] = Alert._jQueryInterface $.fn[NAME].Constructor = Alert $.fn[NAME].noConflict = function () { - $.fn[NAME] = Alert._JQUERY_NO_CONFLICT + $.fn[NAME] = JQUERY_NO_CONFLICT return Alert._jQueryInterface } return Alert -})() +})(jQuery) export default Alert |
