File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -43,17 +43,20 @@ <h1>jTimeout v.1.5 (only 4kb!)</h1>
43
43
44
44
$ ( '.60Left' ) . on ( 'click' , function ( e ) {
45
45
e . preventDefault ( ) ;
46
- $ ( '#curTime' ) . val ( '60' ) . trigger ( 'change' ) ;
46
+ $ . jTimeout . reset ( 60 ) ;
47
+ $ ( '#curTime' ) . val ( window . localStorage . timeoutCountdown ) ;
47
48
} ) ;
48
49
49
50
$ ( '.1440Left' ) . on ( 'click' , function ( e ) {
50
51
e . preventDefault ( ) ;
51
- $ ( '#curTime' ) . val ( '1440' ) . trigger ( 'change' ) ;
52
+ $ . jTimeout . reset ( ) ;
53
+ $ ( '#curTime' ) . val ( window . localStorage . timeoutCountdown ) ;
52
54
} ) ;
53
55
54
56
$ ( '.0Left' ) . on ( 'click' , function ( e ) {
55
57
e . preventDefault ( ) ;
56
- $ . jTimeout . reset ( ) ;
58
+ $ . jTimeout . reset ( 0 ) ;
59
+ $ ( '#curTime' ) . val ( window . localStorage . timeoutCountdown ) ;
57
60
} ) ;
58
61
59
62
$ . jTimeout ( {
@@ -75,11 +78,6 @@ <h1>jTimeout v.1.5 (only 4kb!)</h1>
75
78
} , 1000 ) ;
76
79
} ;
77
80
78
- $ ( '#curTime' ) . on ( 'change' , function ( ) {
79
- window . localStorage . timeoutCountdown = $ ( this ) . val ( ) ;
80
- setTimer ( ) ;
81
- } ) ;
82
-
83
81
setTimer ( ) ;
84
82
85
83
} ) ;
You can’t perform that action at this time.
0 commit comments