mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-06 21:56:42 +02:00
Carousel: move carouselInterface
inside jqueryInterface
This commit is contained in:
@@ -432,8 +432,9 @@ class Carousel extends BaseComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Static
|
// Static
|
||||||
static carouselInterface(element, config) {
|
static jQueryInterface(config) {
|
||||||
const data = Carousel.getOrCreateInstance(element, config)
|
return this.each(function () {
|
||||||
|
const data = Carousel.getOrCreateInstance(this, config)
|
||||||
|
|
||||||
let { _config } = data
|
let { _config } = data
|
||||||
if (typeof config === 'object') {
|
if (typeof config === 'object') {
|
||||||
@@ -457,11 +458,6 @@ class Carousel extends BaseComponent {
|
|||||||
data.pause()
|
data.pause()
|
||||||
data.cycle()
|
data.cycle()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static jQueryInterface(config) {
|
|
||||||
return this.each(function () {
|
|
||||||
Carousel.carouselInterface(this, config)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user