Reputation: 215
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"
});
});
Pls suggust
Upvotes: 3
Views: 2959
Reputation: 2620
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>
Upvotes: 3