Brief description of what your app does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Get DOM elements | |
| const searchInput = document.querySelector("#search-input"); | |
| const searchBtn = document.querySelector("#search-btn"); | |
| const resultsContainer = document.querySelector("#results"); | |
| // Search handler | |
| searchBtn.addEventListener("click", () => { | |
| const query = searchInput.value.trim(); | |
| if (query) { | |
| fetchResults(query); |