@@ -95,11 +95,11 @@ document.addEventListener("DOMContentLoaded",function(){
9595 document . querySelector ( ".cancel-mobile-filters" ) . addEventListener ( "click" , cancelMobileFiltersEventHandler )
9696 document . addEventListener ( 'keydown' , tabFocusedKeyDownHandler ) ;
9797
98- // Event listener for search tip modal
99- openSearchTipsModal ( ) ;
98+ // Add onclick event handlers to open search tips modal if it is clicked.
99+ attachEventListenerOpenModal ( ) ;
100100
101- // Close Search Tips Modal .
102- closeSearchTipsModal ( ) ;
101+ // Add onclick event handlers to close search tips modal if it is open .
102+ attachEventListenerCloseModal ( ) ;
103103
104104 //events related to search bar
105105 document . querySelector ( "#search" ) . addEventListener ( "focus" , searchOnFocusEventHandler ) ;
@@ -406,7 +406,7 @@ function updateUI(){
406406
407407 // Add onclick event handlers to filter tag buttons and a clear all button if filter-tag-button exists in the dom
408408 attachEventListenerToFilterTags ( )
409-
409+
410410}
411411
412412 /**
@@ -867,7 +867,7 @@ function toggleNoResultMsgIfNoMatch(filtersParams,querySelector) {
867867 }
868868}
869869
870- function openSearchTipsModal ( ) {
870+ function attachEventListenerOpenModal ( ) {
871871 document . getElementById ( 'search-tip-link' ) . addEventListener ( 'click' , function ( event ) {
872872 event . preventDefault ( ) ;
873873 updateSearchTipsModal ( ) ;
@@ -891,7 +891,7 @@ function updateSearchTipsModal() {
891891 document . getElementById ( 'search-tip-modal' ) . style . display = 'flex' ;
892892}
893893
894- function closeSearchTipsModal ( ) {
894+ function attachEventListenerCloseModal ( ) {
895895 // Close the modal
896896 document . querySelector ( '.overlay-close-icon' ) . addEventListener ( 'click' , function ( ) {
897897 document . getElementById ( 'search-tip-modal' ) . style . display = 'none' ;
0 commit comments