@@ -34,11 +34,11 @@ video-modal/
3434The ` 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">×</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.
92921. **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
0 commit comments