how to run a function several times after loading the page (alongwith search facets filter) when filter searching for content in aem
I want to remove spans of granite-omnisearch-facet-labelcount / granite-omnisearch-facet-count from search facets having count "0" after resulting content is displayed but the problem is when i run my function after foundation-contentloaded event i am unable to get these spans because page is not loaded properly. Most probably spans of counts are merging with coral-checkboxes after page load event so that is why they are not extracting properly please guide i am new to AEM.