Skip to content

Commit b5c55da

Browse files
author
VersatilityWerks
committed
Fix to demo
1 parent fb7fa94 commit b5c55da

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

index.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,20 @@ <h1>jTimeout v.1.5 (only 4kb!)</h1>
4343

4444
$('.60Left').on('click', function(e){
4545
e.preventDefault();
46-
$('#curTime').val('60').trigger('change');
46+
$.jTimeout.reset(60);
47+
$('#curTime').val( window.localStorage.timeoutCountdown );
4748
});
4849

4950
$('.1440Left').on('click', function(e){
5051
e.preventDefault();
51-
$('#curTime').val('1440').trigger('change');
52+
$.jTimeout.reset();
53+
$('#curTime').val( window.localStorage.timeoutCountdown );
5254
});
5355

5456
$('.0Left').on('click', function(e){
5557
e.preventDefault();
56-
$.jTimeout.reset();
58+
$.jTimeout.reset(0);
59+
$('#curTime').val( window.localStorage.timeoutCountdown );
5760
});
5861

5962
$.jTimeout({
@@ -75,11 +78,6 @@ <h1>jTimeout v.1.5 (only 4kb!)</h1>
7578
}, 1000);
7679
};
7780

78-
$('#curTime').on('change', function(){
79-
window.localStorage.timeoutCountdown = $(this).val();
80-
setTimer();
81-
});
82-
8381
setTimer();
8482

8583
});

0 commit comments

Comments
 (0)