.autocomplete不是一个函数错误 [英] .autocomplete is not a function Error

查看:143
本文介绍了.autocomplete不是一个函数错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是我的我的code

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

和我的HTML code是

And my Html code is

<div class="ui-widget">
<input name="searcharea" class="selectarea" id="searcharea" type="text" value="" placeholder="Area">
</div>

和我的功能是

<script>
$(function(){
    $( "#searcharea" ).autocomplete({
        source: "suggestions.php"
    });
    $( "#searchcat" ).autocomplete({
        source: "suggestions1.php"
    });
});
</script>

我已经包含了这个网页与我的网站的搜索code一个单独的文件,我已经镶嵌其上的各种网页,在我的索引页,这是在暗示我从源文件中值,但在其他页面是给我typerror就行

I have included this page into a seperate file with search code of my website and I have embeded it on various pages, On my index page, it is suggesting me values from source files, but on other pages it is giving me typerror on line

$( "#searcharea" ).autocomplete({

我的网站链接是:
http://www.jodhpuryp.in/

这是我的自我暗示箱源
http://api.jqueryui.com/autocomplete/

This is source of my autosuggestion box http://api.jqueryui.com/autocomplete/

谁能告诉我,为什么我收到我的网站上的其他网页这个错误,而其对指数page.Any帮助工作是AP preciated.Thanks

Can anybody tell me, why I am getting this error on other pages of my website while its working on index page.Any help is appreciated.Thanks

推荐答案

找到了,我包括我的谷歌翻译的另一个jQuery的文件,他们互相冲突,并导致无法加载自动完成功能的问题。

Found the problem, I was including another jquery file for my google translator, they were conflicting with each other and resulting in not loading the autocomplete function.

这篇关于.autocomplete不是一个函数错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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