diff --git a/js/carousel.js b/js/carousel.js
index 9f063aec04c3483223dc04baaf3e7242f4ab37bf..90325f7f51d58f496520d3df2c1f045b7dfa0de4 100644
--- a/js/carousel.js
+++ b/js/carousel.js
@@ -49,8 +49,7 @@
   Carousel.prototype.getActiveIndex = function () {
     this.$active = this.$element.find('.item.active')
     this.$items  = this.$active.parent().children('.item')
-
-    return this.$items.index(this.$active)
+    return this.$active.prevAll('.item').length
   }
 
   Carousel.prototype.to = function (pos) {