Joseph-N / fast-autocomplete

Demo app that shows how to implement a fast autocomplete search in rails using soulmate, soulmate.js and Redis

Home Page:http://josephndungu.com/tutorials/fast-autocomplete-search-terms-rails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use alot of one search bar

ahmednassar246 opened this issue · comments

when i use this example it works in the default search bar in the home page . but when i use a different search bar in a different page, autocomplete doesn't work on it. how can i solve it ?!

Maybe some code could help. How are you calling the autocomplete on the different pages?

I don't call the autocomplete on the home page nor on the different pages. I expect the problem in the routes. and javascript code that you put in home.js. I put it in file called main.js and i expected it will work with all search bars in the site. but it works with the search bar in the home page ..
do i have to make another one of url to work with the other search bar !?
selection_004

Do all the search bars in different pages have id of search? and are there any errors on your browser console?

yes all search bars have id of search. and there is no errors in the browser console.

there are two search bars one of them in the home page "/" and the second in the search view page "/search "

I'm afraid i'm unable to reproduce your problem. I implemented this using the bootstrap navbar which is present in all pages and it worked out fine. Not sure what's wrong in your case