Google Places API自动完成-添加点击事件

Darkagelink

要将搜索结果附加到Google Places javascript API自动完成功能。

到目前为止,我正在这样做:

var autocomplete;  
  function initialize() {
    var myLatlng = new google.maps.LatLng(40.738793, -73.991402);
    autocomplete = new google.maps.places.Autocomplete(document.getElementById('autocomplete'));
  }

后来我有这个:

$('.pac-container').append( '<div class="j-search pac-item-refresh">Search Results</div>' );

$(document.body).on('click', '.pac-container .j-search', function(e) {
    console.log('click fired');
});

问题?点击事件永远不会触发...

知道为什么吗?我的代码有问题吗?

莫勒博士

看来,-instance.pac-container取消了click事件Autocomplete使用mousedown代替。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Google 自动完成 Places API 错误 InvalidValueError

来自分类Dev

Google Places 自动完成 Api 2019

来自分类Dev

Google Places API:了解Places自动完成响应的解析

来自分类Dev

iOS上的Google Places API自动完成功能

来自分类Dev

自动完成文字检视Google Places API

来自分类Dev

Google Places API不显示自动完成下拉列表

来自分类Dev

iOS上的Google Places API自动完成功能

来自分类Dev

自动完成文字检视Google Places API

来自分类Dev

如何获取自动完成TextView的Google Places API?

来自分类Dev

Google Places Api,放置自动完成的mBound查询

来自分类Dev

从Google Places API iOS访问结果以自动完成

来自分类Dev

Google Places 自动完成 Swift 3

来自分类Dev

自动完成使用Google Maps Places API;API不起作用

来自分类Dev

如何将Google Places自动完成功能添加到flask?

来自分类Dev

如何将Google Places自动完成功能添加到flask?

来自分类Dev

无法添加Google Places API密钥

来自分类Dev

Google Places API,GMS仅针对城市,国家/地区iOS自动完成搜索

来自分类Dev

根据Google Places API自动完成功能的类型结果进行过滤

来自分类Dev

IONIC:点击事件需要花费时间从Google Places API中选择地点

来自分类Dev

实施Google Places API

来自分类Dev

Google Places API替代

来自分类Dev

Google Places API的使用

来自分类Dev

Google Places APi照片

来自分类Dev

Google Places 活动 API

来自分类Dev

extjs4中的Google Places自动完成

来自分类Dev

Google Maps Places自动完成搜索任何位置

来自分类Dev

加载Google Places自动完成异步Angular 2

来自分类Dev

Google Maps Places自动完成搜索任何位置

来自分类Dev

在jQuery移动面板中集成Google Places(自动完成)

Related 相关文章

热门标签

归档