mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-29 16:19:53 +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 = {
|
Carousel.prototype = {
|
||||||
|
|
||||||
cycle: function () {
|
cycle: function (e) {
|
||||||
|
if (!e) this.paused = false
|
||||||
this.options.interval
|
this.options.interval
|
||||||
|
&& !this.paused
|
||||||
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
@@ -64,7 +66,8 @@
|
|||||||
return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
|
return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
|
||||||
}
|
}
|
||||||
|
|
||||||
, pause: function () {
|
, pause: function (e) {
|
||||||
|
if (!e) this.paused = true
|
||||||
clearInterval(this.interval)
|
clearInterval(this.interval)
|
||||||
this.interval = null
|
this.interval = null
|
||||||
return this
|
return this
|
||||||
|
13
js/.jshintrc
13
js/.jshintrc
@@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"browser" : true,
|
"validthis": true,
|
||||||
"expr" : true,
|
|
||||||
"laxbreak" : true,
|
|
||||||
"boss" : true,
|
|
||||||
"asi" : true,
|
|
||||||
"laxcomma" : 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 = {
|
Carousel.prototype = {
|
||||||
|
|
||||||
cycle: function () {
|
cycle: function (e) {
|
||||||
|
if (!e) this.paused = false
|
||||||
this.options.interval
|
this.options.interval
|
||||||
|
&& !this.paused
|
||||||
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
@@ -64,7 +66,8 @@
|
|||||||
return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
|
return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
|
||||||
}
|
}
|
||||||
|
|
||||||
, pause: function () {
|
, pause: function (e) {
|
||||||
|
if (!e) this.paused = true
|
||||||
clearInterval(this.interval)
|
clearInterval(this.interval)
|
||||||
this.interval = null
|
this.interval = null
|
||||||
return this
|
return this
|
||||||
|
Reference in New Issue
Block a user