I would like to clear old search query when I make new search query. I tried doing like this but it doesn’t work for me.
export const clearSearchQuery = () => {
elements.movieSearched.innerHTML = '';
}
The movie__Searched class is not clearing but I managed to clear the movie__Container which essentially hold movie posters using same technique .
I have attached an example of my html below.
<main class="film-posters">
<div class="movie__searched">
<h1>“search for Scarface”</h1>
</div>
<div class="movie__container">
<div class="movie__result">
<img src="img/nat-1.jpg" alt="Photo 1" class="movie__photo">
<div class="movie__details">
<h3 class="movie__name">Rambo first blood</h3>
</div>
</div>
</main>