Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Thornton <jacobthornton@gmail.com>2012-04-15 04:49:51 +0400
committerJacob Thornton <jacobthornton@gmail.com>2012-04-15 04:49:51 +0400
commit82267d48ffb522ed4c9cb491660f7d1c8a9e0236 (patch)
tree1382e951003bc8ec89d67b4cedd628a2faf7e0e2 /js/bootstrap-carousel.js
parent34132f0e890cacc8eb2dc0cf2ce3132986f14adf (diff)
calling pause on a slide should actually pause it - even when hovering
Diffstat (limited to 'js/bootstrap-carousel.js')
-rw-r--r--js/bootstrap-carousel.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js
index d1c3079e44..90f43a3ebb 100644
--- a/js/bootstrap-carousel.js
+++ b/js/bootstrap-carousel.js
@@ -37,8 +37,10 @@
Carousel.prototype = {
- cycle: function () {
+ cycle: function (e) {
+ if (!e) this.paused = false
this.options.interval
+ && !this.paused
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
return this
}
@@ -64,7 +66,8 @@
return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
}
- , pause: function () {
+ , pause: function (e) {
+ if (!e) this.paused = true
clearInterval(this.interval)
this.interval = null
return this