Latest news
The lates news about our banking products, services and events.
${result.item.title}
${result.item.description}
` ) .join(""); // Convert array of HTML into a single string } // Attach event listeners for opening the search modal (both click and touch) searchButton.addEventListener("click", openSearch); searchButton.addEventListener("touchend", openSearch); // Attach event listeners for closing the search modal (both click and touch) closeSearch.addEventListener("click", closeSearchModal); closeSearch.addEventListener("touchend", closeSearchModal); // Close the modal when clicking outside the search box modalOverlay.addEventListener("click", closeSearchModal); modalOverlay.addEventListener("touchend", closeSearchModal); // Perform search when input changes searchInput.addEventListener("input", (e) => { const value = e.target.value; // Get the input value const results = value.trim() ? fuse.search(value) : []; // Perform search if input isn't empty renderResults(results); // Update the displayed results }); // Close the search modal when pressing the "Escape" key document.addEventListener("keydown", (e) => { if (e.key === "Escape" && !searchModal.classList.contains("hidden")) { closeSearchModal(); } }); }); })();