algoliasearch-netlify icon indicating copy to clipboard operation
algoliasearch-netlify copied to clipboard

Multiple selectors

Open michalhudecek opened this issue 3 years ago • 1 comments

I want to place the search box in the menu on the website. However, I have two version of the menu - one for desktop and one for mobile. I can't figure out how to initiate Algolia search in both of them. I tried using a class but that doesn't help. It is initiated only once for the desktop version and never shows in the mobile menu.

selector: 'div.algolia-search'

michalhudecek avatar Mar 16 '21 07:03 michalhudecek

Hello @michalhudecek

The plugin can be instanced multiple times without issue (as this very simple demo suggest https://algoliasearch-netlify.netlify.app/) Can you communicate more details (if private you can reach us at [email protected])?

Usually the problem lies in the DOM not being ready when you launch the script.

Best Regards

bodinsamuel avatar Mar 26 '21 12:03 bodinsamuel