aboutsummaryrefslogtreecommitdiff
path: root/js/src/carousel.js
diff options
context:
space:
mode:
authorRohit Sharma <[email protected]>2020-07-22 22:33:11 +0300
committerXhmikosR <[email protected]>2020-11-14 07:09:15 +0200
commit418f17ee2b849dafdc39623ba2378df9229164a7 (patch)
tree7446b75f6b2a8e8ad9f5f8ab8143b4d451c94a14 /js/src/carousel.js
parentfe961c192d951bde610cdcd4817f4d8548d33141 (diff)
downloadbootstrap-418f17ee2b849dafdc39623ba2378df9229164a7.tar.xz
bootstrap-418f17ee2b849dafdc39623ba2378df9229164a7.zip
Add `bs` in data attributes
- Add `bs` in data APIs everywhere - Update unit tests
Diffstat (limited to 'js/src/carousel.js')
-rw-r--r--js/src/carousel.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js
index 84a88bb04..58844a387 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -91,8 +91,8 @@ const SELECTOR_ITEM = '.carousel-item'
const SELECTOR_ITEM_IMG = '.carousel-item img'
const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'
const SELECTOR_INDICATORS = '.carousel-indicators'
-const SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]'
-const SELECTOR_DATA_RIDE = '[data-ride="carousel"]'
+const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'
+const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]'
const PointerType = {
TOUCH: 'touch',
@@ -419,7 +419,7 @@ class Carousel {
return
}
- const elementInterval = parseInt(element.getAttribute('data-interval'), 10)
+ const elementInterval = parseInt(element.getAttribute('data-bs-interval'), 10)
if (elementInterval) {
this._config.defaultInterval = this._config.defaultInterval || this._config.interval
@@ -576,7 +576,7 @@ class Carousel {
...Manipulator.getDataAttributes(target),
...Manipulator.getDataAttributes(this)
}
- const slideIndex = this.getAttribute('data-slide-to')
+ const slideIndex = this.getAttribute('data-bs-slide-to')
if (slideIndex) {
config.interval = false