Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2020-04-09 20:56:43 +0300
committerGitHub <noreply@github.com>2020-04-09 20:56:43 +0300
commit9a5033d41350f83d3b4814648934618ab4648e27 (patch)
tree4f5af04e3c591fc697334f83c56d1c1d02a9dfcb /js/src/collapse.js
parent7126741ffb92469752aef4136b084cad40394a6a (diff)
Pass multiple classes to `classList.add` / `classList.remove` (#30537)
This is supported by our currently supported browsers.
Diffstat (limited to 'js/src/collapse.js')
-rw-r--r--js/src/collapse.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/js/src/collapse.js b/js/src/collapse.js
index fde3e0a9ed..4529a85ec3 100644
--- a/js/src/collapse.js
+++ b/js/src/collapse.js
@@ -192,8 +192,7 @@ class Collapse {
const complete = () => {
this._element.classList.remove(CLASS_NAME_COLLAPSING)
- this._element.classList.add(CLASS_NAME_COLLAPSE)
- this._element.classList.add(CLASS_NAME_SHOW)
+ this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)
this._element.style[dimension] = ''
@@ -230,8 +229,7 @@ class Collapse {
reflow(this._element)
this._element.classList.add(CLASS_NAME_COLLAPSING)
- this._element.classList.remove(CLASS_NAME_COLLAPSE)
- this._element.classList.remove(CLASS_NAME_SHOW)
+ this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)
const triggerArrayLength = this._triggerArray.length
if (triggerArrayLength > 0) {