15 lines
464 B
JavaScript
15 lines
464 B
JavaScript
{17c9771925f05443448abaf7cf4d76c48329f36a true 464 index.js 0xc0030d8d20}
const btnEl = document.querySelector(".btn");
|
|
const closeIconEl = document.querySelector(".close-icon");
|
|
const trailerContainerEl = document.querySelector(".trailer-container");
|
|
const videoEl = document.querySelector("video");
|
|
|
|
btnEl.addEventListener("click", () => {
|
|
trailerContainerEl.classList.remove("active");
|
|
});
|
|
|
|
closeIconEl.addEventListener("click", () => {
|
|
trailerContainerEl.classList.add("active");
|
|
videoEl.pause();
|
|
videoEl.currentTime = 0;
|
|
});
|