Skip to content

Commit

Permalink
restart autoplay only working for nav
Browse files Browse the repository at this point in the history
  • Loading branch information
Visual Idiot committed Nov 17, 2015
1 parent 3c5ef87 commit d323d79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/js/unslider-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions src/js/unslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,6 @@
// Set the right active class, remove any other ones
$me.siblings().removeClass(self.options.activeClass);

// Stop the jerky stop-start
if(self.options.autoplay) {
self.stop().start();
}

// Move the slide
self.animate($me.attr('data-slide'));
});
Expand Down Expand Up @@ -401,6 +396,10 @@
return self;
}

if(self.options.autoplay) {
self.stop().start();
}

self.setIndex(to);

// Add a callback method to do stuff with
Expand Down

0 comments on commit d323d79

Please sign in to comment.