Skip to content

Commit b07823c

Browse files
committed
Pass onComplete upon resume event.
Update QUnit to latest version. fixes #37
1 parent ff0166b commit b07823c

File tree

7 files changed

+7162
-2612
lines changed

7 files changed

+7162
-2612
lines changed

jquery.simple.timer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@
120120

121121
timerBoxElement.on('resume', function() {
122122
timerBoxElement.paused = false;
123-
that.startCountdown(timerBoxElement, { secondsLeft: timerBoxElement.data('timeLeft') });
123+
const secondsLeft = timerBoxElement.data('timeLeft');
124+
const onComplete = timerBoxElement.onComplete;
125+
that.startCountdown(timerBoxElement, { secondsLeft, onComplete });
124126
});
125127

126128
createSubElements(timerBoxElement);

tests/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<title>Tests</title>
6-
<link rel="stylesheet" href="qunit-1.14.0.css">
6+
<link rel="stylesheet" href="qunit-2.9.2.css">
77
</head>
88
<body>
99
<div id="qunit"></div>
@@ -16,7 +16,7 @@
1616

1717
<script src="../jquery.js"></script>
1818
<script src="../jquery.simple.timer.js"></script>
19-
<script src="qunit-1.14.0.js"></script>
19+
<script src="qunit-2.9.2.js"></script>
2020
<script src="tests.js"></script>
2121
</body>
2222
</html>

tests/qunit-1.14.0.css

Lines changed: 0 additions & 237 deletions
This file was deleted.

0 commit comments

Comments
 (0)