|
@@ -99,7 +99,6 @@
|
|
timer = this.settings.timer,
|
|
timer = this.settings.timer,
|
|
overlay = this.settings.overlay,
|
|
overlay = this.settings.overlay,
|
|
preload = this.settings.preload,
|
|
preload = this.settings.preload,
|
|
- position = this.$elmt.css('position'),
|
|
|
|
img,
|
|
img,
|
|
i;
|
|
i;
|
|
|
|
|
|
@@ -165,10 +164,7 @@
|
|
_slideShow: function () {
|
|
_slideShow: function () {
|
|
var self = this;
|
|
var self = this;
|
|
|
|
|
|
- if (this.paused || this.noshow) {
|
|
|
|
- clearTimeout(this.timeout);
|
|
|
|
- } else {
|
|
|
|
- clearTimeout(this.timeout);
|
|
|
|
|
|
+ if (this.total > 1 && !this.paused && !this.noshow) {
|
|
this.timeout = setTimeout(function () {
|
|
this.timeout = setTimeout(function () {
|
|
self.next();
|
|
self.next();
|
|
}, this._options('delay'));
|
|
}, this._options('delay'));
|
|
@@ -180,7 +176,7 @@
|
|
|
|
|
|
clearTimeout(this.timeout);
|
|
clearTimeout(this.timeout);
|
|
|
|
|
|
- if (!this.$timer || this.paused || this.noshow) {
|
|
|
|
|
|
+ if (!this.$timer) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -189,6 +185,10 @@
|
|
.find('div')
|
|
.find('div')
|
|
.css('transition-duration', '0ms');
|
|
.css('transition-duration', '0ms');
|
|
|
|
|
|
|
|
+ if (this.paused || this.noshow) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (state) {
|
|
if (state) {
|
|
setTimeout(function () {
|
|
setTimeout(function () {
|
|
self.$timer
|
|
self.$timer
|
|
@@ -468,6 +468,10 @@
|
|
} else {
|
|
} else {
|
|
return this.settings;
|
|
return this.settings;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // In case slides have changed
|
|
|
|
+ this.total = this.settings.slides.length;
|
|
|
|
+ this.noshow = this.total < 2;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|