mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-05 16:42:29 +03:00
Add bs in data attributes
- Add `bs` in data APIs everywhere - Update unit tests
This commit is contained in:
+4
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user