Matteo Enna
Matteo Enna

Reputation: 1301

Wordpress: no such method 'instance' for menu widget instance

i am using wordpress 4.7.3 version. I installed a new theme. I find an error in the console next to a textarea.

Uncaught Error: no such method 'instance' for menu widget instance

the code is:

jQuery(function() {
    jQuery("#address").autocomplete({
        //This bit uses the geocoder to fetch address values
        source: function(request, response) {
            geocoder.geocode( {'address': request.term }, function(results, status) {
                response(jQuery.map(results, function(item) {
                    return {
                        label:  item.formatted_address,
                        value: item.formatted_address,
                        latitude: item.geometry.location.lat(),
                        longitude: item.geometry.location.lng()
                    }
                }));
            })
        },
        //This bit is executed upon selection of an address
        select: function(event, ui) {
            jQuery("#latitude").val(ui.item.latitude);
            jQuery("#longitude").val(ui.item.longitude);

            var location = new google.maps.LatLng(ui.item.latitude, ui.item.longitude);

            marker.setPosition(location);
            map.setZoom(16);
            map.setCenter(location);

        }
     });
});

Where is the problem?

Upvotes: 2

Views: 3667

Answers (1)

ThemeFuzz
ThemeFuzz

Reputation: 31

I had an exact problem. The problem was that a plugin was loading an old version of jQuery mobile plugin.

Upvotes: 3

Related Questions