Skip to content
This repository has been archived by the owner on Dec 12, 2018. It is now read-only.

Commit

Permalink
#5 add animation frame
Browse files Browse the repository at this point in the history
  • Loading branch information
frankbaele committed Jun 28, 2016
1 parent 96e1eaf commit 647e992
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ var constructor = function (container, outerContainer) {
};
createInterval();
function createInterval() {
clearInterval(interval);
interval = setInterval(function () {
setTimeout(function () {
if (!hovering) {
next();
}
window.requestAnimationFrame(createInterval)
}, loopSpeed);
}

Expand Down

0 comments on commit 647e992

Please sign in to comment.