Skip to content

Commit 613458e

Browse files
committed
Merge pull request jquerytools#405 from unserwein/master
Added a resume api function to resolve issue jquerytools#268 - Manually stopped autoscroll, continues on mouseout
2 parents d65b237 + 945ffc2 commit 613458e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/scrollable/scrollable.autoscroll.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@
5757
timer = clearInterval(timer);
5858
};
5959

60+
// resume playing if not stopped
61+
api.resume = function() {
62+
stopped || api.play();
63+
};
64+
6065
// when stopped - mouseover won't restart
6166
api.stop = function() {
6267
api.pause();
@@ -65,7 +70,7 @@
6570

6671
/* when mouse enters, autoscroll stops */
6772
if (opts.autopause) {
68-
api.getRoot().add(api.getNaviButtons()).hover(api.pause, api.play);
73+
api.getRoot().add(api.getNaviButtons()).hover(api.pause, api.resume);
6974
}
7075

7176
if (opts.autoplay) {

0 commit comments

Comments
 (0)