File tree 3 files changed +12
-2
lines changed
3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -94,4 +94,7 @@ section div{
94
94
}
95
95
.d-flex > * {
96
96
width : 100% ;
97
+ }
98
+ .livro-marcos > * {
99
+ cursor : pointer;
97
100
}
Original file line number Diff line number Diff line change 8
8
< link rel ="
stylesheet "
href ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/css/bootstrap.min.css "
integrity ="
sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N "
crossorigin ="
anonymous "
>
9
9
< link href ="https://fonts.googleapis.com/icon?family=Material+Icons " rel ="stylesheet ">
10
10
< link rel ="stylesheet " href ="css/layout.css ">
11
+ < script src ="js/updateMark.js " defer > </ script >
11
12
< script src ="js/book.js " defer > </ script >
12
13
</ head >
13
14
< body >
@@ -64,15 +65,15 @@ <h1>Books</h1>
64
65
</ p >
65
66
</ div >
66
67
< div class ="livro-marcos ">
67
- < div >
68
+ < div onclick =" updateMark(this) " >
68
69
< span class ="material-icons ">
69
70
book
70
71
</ span >
71
72
< span class ="round ">
72
73
12
73
74
</ span >
74
75
</ div >
75
- < div >
76
+ < div onclick =" updateMark(this) " >
76
77
< span class ="material-icons ">
77
78
favorite
78
79
</ span >
Original file line number Diff line number Diff line change
1
+
2
+ function updateMark ( marcador ) {
3
+ let campo = marcador . querySelector ( ".round" ) ;
4
+ let valor = parseInt ( campo . innerHTML ) ;
5
+ campo . innerHTML = ++ valor ;
6
+ }
You can’t perform that action at this time.
0 commit comments