Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple selectors #241

Open
michalhudecek opened this issue Mar 16, 2021 · 1 comment
Open

Multiple selectors #241

michalhudecek opened this issue Mar 16, 2021 · 1 comment

Comments

@michalhudecek
Copy link

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'

@bodinsamuel
Copy link
Contributor

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 support@algolia.com)?

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

Best Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants