Skip to content

Commit 3235533

Browse files
soonu-kedarisumn2u
authored andcommitted
FIX: Comment fixes for a Video Popup Modal
1 parent 74c2495 commit 3235533

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

examples/video-popup/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ video-modal/
3434
The `index.html` file defines the structure of the webpage. It includes:
3535

3636
#### **Key Elements**
37-
- `<div class="movie-container">` — Wraps all content like the movie thumbnail, title, description, and button.
37+
- `<div class="movie-card">` — Wraps all content like the movie thumbnail, title, description, and button.
3838
- `<img>` — Displays the movie’s thumbnail or poster image.
3939
- `<h1>` — The movie title.
4040
- `<p>` — A short movie description or tagline.
41-
- `<button id="openModal">` — Button to trigger the modal popup.
41+
- `<button id="openModalBtn">` — Button to trigger the modal popup.
4242
- `<div id="videoModal" class="modal">` — The modal container that holds the video player.
4343
- `<span class="close">&times;</span>` — The close icon (×) used to close the modal.
4444
- `<video>` — The HTML5 video element that plays the trailer inside the modal.
@@ -92,9 +92,9 @@ The `script.js` file manages all interactions between the user and the modal.
9292
1. **Element References**
9393
```js
9494
const modal = document.getElementById("videoModal");
95-
const btn = document.getElementById("openModal");
96-
const span = document.getElementsByClassName("close")[0];
97-
const video = document.getElementById("trailerVideo");
95+
const btn = document.getElementById("openModalBtn");
96+
const span = document.getElementById("closeModalBtn");
97+
const video = document.getElementById("trailer");
9898
```
9999
These lines reference the key DOM elements for manipulation.
100100

examples/video-popup/style.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ body {
3939
margin: 10px 0 5px;
4040
}
4141

42-
.popup-title{
42+
.popup-title {
4343
font-size: 24px;
4444
margin: 10px;
4545
}
@@ -70,7 +70,8 @@ body {
7070
/* Modal overlay */
7171
.modal {
7272
position: fixed;
73-
top: 0; left: 0;
73+
top: 0;
74+
left: 0;
7475
width: 100%;
7576
height: 100%;
7677
display: none;

0 commit comments

Comments
 (0)