Link to home
Start Free TrialLog in
Avatar of kgp43
kgp43Flag for Denmark

asked on

jQuery autocomplete sort

Hi,

I have problems with the jQuery autocomplete.
When i type the word "abc", then it will list all these results:

- abc something
- something abc
- someting else abc

All sentences containing the word "abc"
I only want to show results starting with "abc", how is that possible?
Have searched a lot and wasnt able to find anything :(

	<script>
		
		$(function() {
			var availableTags = <?php include($_SERVER['DOCUMENT_ROOT'].'/include/autocomplete.php'); ?>;
			$("#company-name").autocomplete({
				source: availableTags,
				autoFocus: true,
			});
		});
		
	</script>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of kgp43
kgp43
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial