jQuery和QUOT;自动完成不是一个函数" [英] jQuery "autocomplete is not a function"

查看:139
本文介绍了jQuery和QUOT;自动完成不是一个函数"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到了这几个不同的问题,但我似乎无法找到,将适合我的一个解决方案。我用下面的code(使用UWA Widget框架),我总是收到消息自动完成不是一个函数。我打电话的autocomplete.js文件,所以我不知道为什么我仍然得到这个消息。

 < HTML和GT;
    <标题>
    &所述; SCRIPT SRC =HTTP://$c$c.jquery.com/jquery-latest.js>&下; /脚本>
  <链接rel =stylesheet属性HREF =htt​​p://dev.jquery.com/view/trunk/plugins/autocomplete/demo/main.css类型=文/ CSS/>
  <链接rel =stylesheet属性HREF =htt​​p://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.css类型=文/ CSS/>
  &LT;脚本类型=文/ JavaScript的 src=\"http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgiframe.min.js\"></script>
  &LT;脚本类型=文/ JavaScript的 src=\"http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.dimensions.js\"></script>
  &LT;脚本类型=文/ JavaScript的 src=\"http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js\"></script>
  &LT;脚本&GT;
       &LT;![CDATA [
      widget.onLoad =功能(){
      VAR数据=苹果梨熊香蕉.split();
    $(#搜索),自动完成(数据)。
  };
  ]]&GT;
  &LT; / SCRIPT&GT;&LT; /头&GT;
   &LT;身体GT;
     我的名字:其中,输入ID =搜索/&GT;
   &LT; /身体GT;
&LT; / HTML&GT;


解决方案

dev.jquery.com 不允许盗链。主机上的文件别处。

看到它自己

将其固定后,请阅读文档一次。

I've seen a few different questions on this but I can't seem to find a solution that would fit mine. I'm using the following code (using the UWA widget framework) and I always receive the message "autocomplete is not a function". I am calling the autocomplete.js file so I'm not sure why I still get this message.

    <html>
    <title>
    <script src="http://code.jquery.com/jquery-latest.js"></script>
  <link rel="stylesheet" href="http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/main.css" type="text/css" />
  <link rel="stylesheet" href="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.css" type="text/css" />
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgiframe.min.js"></script>
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.dimensions.js"></script>
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js"></script>
  <script>
       <![CDATA[
      widget.onLoad = function(){
      var data = "apple pears bears bananas".split(" ");
    $("#search").autocomplete(data);
  };
  ]]>
  </script>

</head>
   <body>
     My name: <input id="search" />
   </body>
</html>

解决方案

dev.jquery.com don't allow hotlinking. Host the files somewhere else.

See it for yourself.

After fixing it, read the documentation again.

这篇关于jQuery和QUOT;自动完成不是一个函数&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆