Spaces:
Running
Running
File size: 720 Bytes
1cf9796 ea386b3 739c018 ea386b3 19d2497 739c018 ea386b3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
// 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.');
});
|