How can I simplify this code? if needed I can rename the .php files to be the same exact name as the ID element so $("#locus")
can be used /js/zip/"id element".php
or whatever. Thats only if that helps out.
<script type="text/javascript">
$().ready(function() {
$("#locus").autocomplete("/js/zip/us.php", {
matchContains: true, matchFirst: true, mustMatch: false,
selectFirst: false, cacheLength: 10, minChars: 1, autofill: false,
scrollHeight: 150, width: 185, max: 20, scroll: true
});
$("#locca").autocomplete("/js/zip/ca.php", {
matchContains: true, matchFirst: true, mustMatch: false,
selectFirst: false, cacheLength: 10, minChars: 1, autofill: false,
scrollHeight: 150, width: 185, max: 20, scroll: true
});
$("#locuk").autocomplete("/js/zip/uk.php", {
matchContains: true, matchFirst: true, mustMatch: false,
selectFirst: false, cacheLength: 10, minChars: 1, autofill: false,
scrollHeight: 150, width: 185, max: 20, scroll: true
});
$("#locau").autocomplete("/js/zip/au.php", {
matchContains: true, matchFirst: true, mustMatch: false,
selectFirst: false, cacheLength: 10, minChars: 1, autofill: false,
scrollHeight: 150, width: 185, max: 20, scroll: true
});
$("#locie").autocomplete("/js/zip/ie.php", {
matchContains: true, matchFirst: true, mustMatch: false,
selectFirst: false, cacheLength: 10, minChars: 1, autofill: false,
scrollHeight: 150, width: 185, max: 20, scroll: true
});
$("#locot").autocomplete("/js/zip/ot.php", {
matchContains: true, matchFirst: true, mustMatch: false,
selectFirst: false, cacheLength: 10, minChars: 1, autofill: false,
scrollHeight: 150, width: 185, max: 20, scroll: true
});
});
</script>