Spaces:
Running
Running
// Function to display a movie trailer (placeholder) | |
function showTrailer() { | |
alert('Trailer is not available yet.'); | |
} | |
// Function to add a movie to My List (placeholder) | |
function addToMyList() { | |
alert('Added to My List!'); | |
} | |
// Add event listeners to movie posters | |
const moviePosters = document.querySelectorAll('.movie-posters img'); | |
moviePosters.forEach(poster => { | |
poster.addEventListener('click', showTrailer); | |
}); | |
// Add event listener to the "More Info" button (placeholder) | |
const moreInfoButton = document.querySelector('.hero-buttons button:last-child'); | |
moreInfoButton.addEventListener('click', () => { | |
alert('More info about the movie will be displayed here.'); | |
}); | |