From c7ef5810e11bf994d31bb385d794cafc50411c93 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Wed, 17 Dec 2014 18:30:16 -0800 Subject: rename .item => .carousel-item --- js/carousel.js | 6 +- js/tests/unit/carousel.js | 152 +++++++++++++++++++++--------------------- js/tests/visual/carousel.html | 6 +- 3 files changed, 82 insertions(+), 82 deletions(-) (limited to 'js') diff --git a/js/carousel.js b/js/carousel.js index 99a077c10..1e8215c8b 100644 --- a/js/carousel.js +++ b/js/carousel.js @@ -65,7 +65,7 @@ } 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) } @@ -81,7 +81,7 @@ 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 @@ -115,7 +115,7 @@ } 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' diff --git a/js/tests/unit/carousel.js b/js/tests/unit/carousel.js index 008b72082..1598787f1 100644 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@ -51,13 +51,13 @@ $(function () { + '
  • ' + '' + '