geocomplete不是使用自动完成功能 [英] geocomplete is not a function using autocomplete
本文介绍了geocomplete不是使用自动完成功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用自动填充的代码,如果在本地(分隔文件)中使用它,则错误geocomplete不是一个函数,它对我有用是什么错误
Hi i am using autopopulated code getting the error geocomplete is not a function if is used it in locally (seperated file) it works for me what can be the error
$(function () {
$("#location").geocomplete({
//alert("gine");
details: ".geo-details",
detailsAttribute: "data-geo"
});
});
建议
推荐答案
在调用geocomplete()
方法之前,必须添加jquery.min.js
和jquery.geocomplete.min.js
:
You must to add the jquery.min.js
and jquery.geocomplete.min.js
before call the geocomplete()
method:
<script src="/javascripts/jquery.min.js" type="text/javascript"></script>
<script src="/javascripts/jquery.geocomplete.min.js" type="text/javascript"></script>
<script type="text/javascript">
$("#location").geocomplete({
details: ".geo-details",
detailsAttribute: "data-geo"
});
</script>
这篇关于geocomplete不是使用自动完成功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文