mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-28 15:50:01 +02:00
calling pause on a slide should actually pause it - even when hovering
This commit is contained in:
Binary file not shown.
7
docs/assets/js/bootstrap-carousel.js
vendored
7
docs/assets/js/bootstrap-carousel.js
vendored
@@ -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
|
||||
|
13
js/.jshintrc
13
js/.jshintrc
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"browser" : true,
|
||||
"expr" : true,
|
||||
"laxbreak" : true,
|
||||
"boss" : true,
|
||||
"asi" : true,
|
||||
"validthis": true,
|
||||
"laxcomma" : true,
|
||||
"validthis": true
|
||||
"laxbreak" : true,
|
||||
"browser" : true,
|
||||
"debug" : true,
|
||||
"boss" : true,
|
||||
"expr" : true,
|
||||
"asi" : true
|
||||
}
|
7
js/bootstrap-carousel.js
vendored
7
js/bootstrap-carousel.js
vendored
@@ -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
|
||||
|
Reference in New Issue
Block a user