vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js in twitter-bootstrap-rails-2.0.2 vs vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js in twitter-bootstrap-rails-2.0.3
- old
+ new
@@ -1,7 +1,7 @@
/* ==========================================================
- * bootstrap-carousel.js v2.0.0
+ * bootstrap-carousel.js v2.0.1
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -59,10 +59,11 @@
return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
}
, pause: function () {
clearInterval(this.interval)
+ this.interval = null
return this
}
, next: function () {
if (this.sliding) return
@@ -80,10 +81,12 @@
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
, fallback = type == 'next' ? 'first' : 'last'
, that = this
+ if (!$next.length) return
+
this.sliding = true
isCycling && this.pause()
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
@@ -149,6 +152,6 @@
$target.carousel(options)
e.preventDefault()
})
})
-}( window.jQuery )
+}( window.jQuery );
\ No newline at end of file