Carousel: move `carouselInterface` inside `jqueryInterface`

This commit is contained in:
GeoSot 2022-02-19 19:04:50 +02:00 committed by XhmikosR
parent 13042d25ca
commit eb8d5b43ce
1 changed files with 24 additions and 28 deletions

View File

@ -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)
}) })
} }
} }