Skip to content

Commit 3579f6b

Browse files
authored
Update Example.html
1 parent a7d1ce8 commit 3579f6b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Example.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,20 @@ <h1>Example TinyTimer.js</h1>
1515

1616
<div data-timer-duration="7" data-timer-mutation="2" data-timer-repeat="2"></div>
1717

18-
<div data-timer-duration="7" data-timer-delay="2000" data-timer-mutation="2" data-timer-repeat="2"></div>
19-
18+
<div data-timer-duration="7" data-timer-mutation="2" data-timer-finish="finish" data-timer-repeat="2"></div>
19+
2020
<script>
2121
function done(index)
2222
{
2323
console.log("#"+index+" : Done");
2424
}
2525
function finish(index)
2626
{
27+
let element=document.querySelector("div.timer-"+index);
28+
if(element)//Found
29+
{
30+
element.textContent="Finish!";
31+
}
2732
console.log("#"+index+" : Finish");
2833
}
2934
function update(index)

0 commit comments

Comments
 (0)