1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-21 20:55:50 +02:00
This commit is contained in:
Mark Otto
2014-12-18 20:19:53 -08:00
parent 41226bd91e
commit 94753bc3ec
11 changed files with 43 additions and 51 deletions

View File

@@ -354,7 +354,7 @@ if (typeof jQuery === 'undefined') {
}
Carousel.prototype.getItemIndex = function (item) {
this.$items = item.parent().children('.item')
this.$items = item.parent().children('.carousel-item')
return this.$items.index(item || this.$active)
}
@@ -370,7 +370,7 @@ if (typeof jQuery === 'undefined') {
Carousel.prototype.to = function (pos) {
var that = this
var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
var activeIndex = this.getItemIndex(this.$active = this.$element.find('.carousel-item.active'))
if (pos > (this.$items.length - 1) || pos < 0) return
@@ -404,7 +404,7 @@ if (typeof jQuery === 'undefined') {
}
Carousel.prototype.slide = function (type, next) {
var $active = this.$element.find('.item.active')
var $active = this.$element.find('.carousel-item.active')
var $next = next || this.getItemForDirection(type, $active)
var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right'