aej1973
asked on
auto complete using jquery...
Hi, I have an autocomplete code as attached. The problem is that it picks up the match anywhere in the string. How can I change the code to pick the match staring from the beginning of the string?
Eg; search 11 needs to pick up 11237 and not 198112. Thank you for the help.
A
Eg; search 11 needs to pick up 11237 and not 198112. Thank you for the help.
A
<script type="text/javascript">
$().ready(function() {
$("#account").autocomplete("account.php", {
width: 260,
matchContains: true,
mustMatch: true,
selectFirst: true
});
$("#account").result(function(event, data, formatted) {
$("#account").val(data[1]);
});
});
</script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
A