Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript TypeError:$(…)。easyAutocomplete不是函数_Javascript_Jquery_Autocomplete_Easyautocomplete - Fatal编程技术网

Javascript TypeError:$(…)。easyAutocomplete不是函数

Javascript TypeError:$(…)。easyAutocomplete不是函数,javascript,jquery,autocomplete,easyautocomplete,Javascript,Jquery,Autocomplete,Easyautocomplete,我试图跟随jquery并得到这个错误。我知道这是一个非常常见的问题,在这方面也有人提出过一些问题。但它们似乎都不能消除我的错误。这是我的密码 test.js var options = { url: "places.json", getValue: "name", list: { match: { enabled: true } }, theme: "square" }; $("#textbox").easyAutocomplete(opti

我试图跟随jquery并得到这个错误。我知道这是一个非常常见的问题,在这方面也有人提出过一些问题。但它们似乎都不能消除我的错误。这是我的密码

test.js

var options = {
  url: "places.json",
  getValue: "name",

  list: {
    match: {
      enabled: true
    }
  },

  theme: "square"
};

$("#textbox").easyAutocomplete(options);
html

在报告中,它说:

为了使用EasyAutocomplete,请将这些文件添加到 你的页面

<!-- JS file -->
<script src="path/to/jquery.easy-autocomplete.min.js"></script> 

<!-- CSS file -->
<link rel="stylesheet" href="path/to/easy-autocomplete.min.css"> 

<!-- Additional CSS Themes file - not required-->
<link rel="stylesheet" href="path/to/easy-autocomplete.themes.min.css"> 

记住要包括jQuery文件。您可以从下载库。最佳做法是使用CDN服务器:

<!-- Using jQuery with a CDN -->
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>


基于此,您需要在jquery之后和您自己的代码之前包含
jquery.easy autocomplete.min.js
。您还应该包括
easy autocomplete.min.css

您还没有在页面中包括easyautocomplete库。它不是标准的jQuery方法。请参阅文档的“入门”部分:将easyautocomplete库包含在第页中,错误就会消失。您能告诉我如何找到
路径/to/
?我正在使用ubuntu@ProteetiProva由于您将CDN用于其他内容,因此您可能可以使用
https://cdnjs.cloudflare.com/ajax/libs/easy-autocomplete/1.3.5/jquery.easy-autocomplete.min.js
https://cdnjs.cloudflare.com/ajax/libs/easy-autocomplete/1.3.5/easy-autocomplete.min.css
<!-- JS file -->
<script src="path/to/jquery.easy-autocomplete.min.js"></script> 

<!-- CSS file -->
<link rel="stylesheet" href="path/to/easy-autocomplete.min.css"> 

<!-- Additional CSS Themes file - not required-->
<link rel="stylesheet" href="path/to/easy-autocomplete.themes.min.css"> 
<!-- Using jQuery with a CDN -->
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>