const searchInput = $('#search-input'); const searchButton = $('#search-button'); // Checking the search field function validateSearch() { if (searchInput.val().trim() === '') { searchButton.prop('disabled', true); // Disable "Find" button } else { searchButton.prop('disabled', false); // Activate "Find" button } } // Input event listener for checking when the field value changes searchInput.on('input', validateSearch);