Q:

jQuery Autocomplete Uncaught TypeError

the script below works fine when the file is in the root folder but when I move it to a folder 3 levels in, it stops working.  with an error on this line $(this).autocomplete("/js/zip/" + $(this).data("code") + ".php", { of course i changed out the url, to reflect the location of ../../js/zip, domain.com/js/zip/ 
console error: Uncaught TypeError: Object [object Object] has no method 'autocomplete'
<link rel="stylesheet" type="text/css" href="/js/zip/jquery.autocomplete.css"/>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.js"></script>
<script type="text/javascript" src="/js/zip/jquery.autocomplete.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#ctry").change(function() {
  $(".state").hide();
  var stateSelect = $("#state_" + $(this).val());
  stateSelect.show();      
});
$("input[data-code]").each(function() {
  $(this).autocomplete("/js/zip/" + $(this).data("code") + ".php", {
  matchContains: true, matchFirst: true, mustMatch: false,
  selectFirst: false, cacheLength: 10, minChars: 1, autofill: false,
  scrollHeight: 150, width: 180, max: 20, scroll: true
  });
});
});
</script>

A:

That error message is typical when the plugin did not load.   Check the console or network tabs (depending on which browser and tools you're using) and see if jquery.autocomplete.js failed to load.   You can also, prior to the line where the error occurs, write console.log($); and then you can inspect the jQuery object in the console and confirm that it is missing the autocomplete() method.