I have Bassistance's version of the JQuery autocomplete plugin set up to query my database of courses.
In the database I have (amongst many others) the following courses:
1) Yoga for All - Hatha Raja Introduction
2) Yoga - Iyengar Style. Beginners & Intermediate
3) Yoga - Iyengar. Improvers
4) Y开发者_如何学Coga - Iyengar. Beginners
5) Yoga for All - Hatha Introduction
6) Yoga for All - Hatha Advanced
7) Yoga for All - Hatha Raja Intermediate
If I search for "yoga" I only get course 5, 6 and 7. Should return all 7.
If I put a space at the beginning, I get all 7 courses, but no highlighting.
If I search for "yoga all" I get no results. Should return 4.
The plugin gets in the results from a php page. I've tried placing the search terms directly into the query string on the php file and it brings back the correct courses.
So the problem is definately at the plugin side. I've tried experimenting with the various options http://docs.jquery.com/Plugins/Autocomplete/autocomplete#url_or_dataoptions but nothing has fixed the problem.
Use Firebug and look at the "NET" tab to see if the requests/response are matching up with what you think they should be. This will show you the data being sent as well as the data coming back.
Firebug NET tab explained
It looks like the plugin is no longer being developed as the functionality is now part of JQueryUI: http://jqueryui.com/demos/autocomplete/
In testing, this gives me better results.
精彩评论