From 82267d48ffb522ed4c9cb491660f7d1c8a9e0236 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 14 Apr 2012 17:49:51 -0700 Subject: calling pause on a slide should actually pause it - even when hovering --- docs/assets/bootstrap.zip | Bin 71274 -> 71315 bytes docs/assets/js/bootstrap-carousel.js | 7 +++++-- js/.jshintrc | 11 ++++++----- js/bootstrap-carousel.js | 7 +++++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip index 267b9eab6..6e1a6f41c 100644 Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ diff --git a/docs/assets/js/bootstrap-carousel.js b/docs/assets/js/bootstrap-carousel.js index d1c3079e4..90f43a3eb 100644 --- a/docs/assets/js/bootstrap-carousel.js +++ b/docs/assets/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 diff --git a/js/.jshintrc b/js/.jshintrc index e93a8deee..bbac349e8 100644 --- a/js/.jshintrc +++ b/js/.jshintrc @@ -1,9 +1,10 @@ { - "browser" : true, - "expr" : true, + "validthis": true, + "laxcomma" : true, "laxbreak" : true, + "browser" : true, + "debug" : true, "boss" : true, - "asi" : true, - "laxcomma" : true, - "validthis": true + "expr" : true, + "asi" : true } \ No newline at end of file diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index d1c3079e4..90f43a3eb 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 -- cgit v1.2.3