]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
calling pause on a slide should actually pause it - even when hovering
authorJacob Thornton <jacobthornton@gmail.com>
Sun, 15 Apr 2012 00:49:51 +0000 (17:49 -0700)
committerJacob Thornton <jacobthornton@gmail.com>
Sun, 15 Apr 2012 00:49:51 +0000 (17:49 -0700)
docs/assets/bootstrap.zip
docs/assets/js/bootstrap-carousel.js
js/.jshintrc
js/bootstrap-carousel.js

index 267b9eab651853e2401a31e44210b784d32c3301..6e1a6f41c17a1772192889d99ed1f990790ff463 100644 (file)
Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ
index d1c3079e443863219a6292b14eba31f96f51c622..90f43a3ebb5ea587f7c80692ed618f9452285342 100644 (file)
 
   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
index e93a8deeed99062fe93cb3b32f07a1017e06ffa2..bbac349e8fd771143cd4387dcead255f55e75a61 100644 (file)
@@ -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
index d1c3079e443863219a6292b14eba31f96f51c622..90f43a3ebb5ea587f7c80692ed618f9452285342 100644 (file)
 
   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