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