2017-04-14 42 views
1

我使用wordpress 4.7.3版本。我安装了一个新的主题。我在textarea旁边的控制台中发现错误。WordPress的:没有这样的方法'实例'的菜单部件实例

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

代码:

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); 

     } 
    }); 
}); 

问题出在哪里?

回答

1

我有一个确切的问题。问题是一个插件加载了旧版本的jQuery手机插件。