Commit 707d100 1 parent 1f525f4 commit 707d100 Copy full SHA for 707d100
File tree 2 files changed +27
-4
lines changed
2 files changed +27
-4
lines changed Original file line number Diff line number Diff line change
1
+ var row1_films = document . getElementById ( 'films-row1' ) ;
2
+ var row1_desc = document . getElementById ( 'desc-row1' ) ;
3
+
4
+ //Creating static 1
5
+ var static1 = document . createElement ( 'div' ) ;
6
+ static1 . classList = 'film' ;
7
+ var id_film = 'film1' ;
8
+ static1 . id = id_film ;
9
+ static1 . setAttribute ( 'onclick' , 'toggleDesc("desc-' + id_film + '")' ) ;
10
+ row1_films . appendChild ( static1 ) ;
11
+ var image_static1 = document . createElement ( 'img' ) ;
12
+ image_static1 . src = 'assets/static1.jpg' ;
13
+ static1 . appendChild ( image_static1 ) ;
14
+
15
+ var desc1 = document . createElement ( 'div' ) ;
16
+ desc1 . classList = 'desc' ;
17
+ var id_desc1 = 'desc-film1' ;
18
+ desc1 . id = id_desc1 ;
19
+ row1_desc . appendChild ( desc1 ) ;
20
+
1
21
var i = 0 ;
2
- var j = 0 ;
22
+ var j = 1 ;
3
23
4
24
while ( i < 3 ) {
5
25
@@ -63,8 +83,10 @@ while(i < 3){
63
83
64
84
function toggleDesc ( el ) {
65
85
var display = document . getElementById ( el ) . style . display ;
66
- if ( display == " none" )
86
+ if ( display == ' none' || display == '' ) {
67
87
document . getElementById ( el ) . style . display = 'flex' ;
68
- else
88
+ }
89
+ else {
69
90
document . getElementById ( el ) . style . display = 'none' ;
91
+ }
70
92
}
Original file line number Diff line number Diff line change @@ -179,7 +179,6 @@ body{
179
179
}
180
180
181
181
.desc-text {
182
- width : 280px ;
183
182
color : white;
184
183
border : none;
185
184
background-color : transparent;
@@ -190,10 +189,12 @@ body{
190
189
}
191
190
192
191
# input-title {
192
+ width : 280px ;
193
193
font-size : 45px ;
194
194
}
195
195
196
196
# input-year {
197
+ width : 280px ;
197
198
font-size : 15px ;
198
199
}
199
200
You can’t perform that action at this time.
0 commit comments