8000 restart autoplay only working for nav · Dream-git/unslider@d323d79 · GitHub
[go: up one dir, main page]

Skip to content

Commit d323d79

Browse files
author
Visual Idiot
committed
restart autoplay only working for nav
1 parent 3c5ef87 commit d323d79

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

dist/js/unslider-min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/unslider.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,6 @@
232232
// Set the right active class, remove any other ones
233233
$me.siblings().removeClass(self.options.activeClass);
234234

235-
// Stop the jerky stop-start
236-
if(self.options.autoplay) {
237-
self.stop().start();
238-
}
239-
240235
// Move the slide
241236
self.animate($me.attr('data-slide'));
242237
});
@@ -401,6 +396,10 @@
401396
return self;
402397
}
403398

399+
if(self.options.autoplay) {
400+
self.stop().start();
401+
}
402+
404403
self.setIndex(to);
405404

406405
// Add a callback method to do stuff with

0 commit comments

Comments
 (0)
0