Commit 82267d48 authored by Jacob Thornton's avatar Jacob Thornton

calling pause on a slide should actually pause it - even when hovering

parent 34132f0e
......@@ -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
......
{
"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
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment