Understanding jquery - constructor error?

I am new to javascript and created a script that works in webkit but not in firefox. When I check for errors in firebug, I get the following:

google.maps.Geocoder is not a constructor
    $('.to, .from').geo_autocomplete(new google.maps.Geocoder, { 

what does it mean?

+3
source share
1 answer

Your function starts when the API does not load completely or you do not load them at all :) http://code.google.com/apis/ajax/documentation/ - Here is an example, I hope this helps you.

+1
source

Source: https://habr.com/ru/post/1764325/


All Articles