百度地图 Infowidow 内容(content 下标签) 点击事件

时间:2018-03-29 14:21:15   收藏:0   阅读:453

    需要监听 infowindow 的打开事件 ,查看InfoWindow API 技术分享图片

  实现 html 点击效果 代码

     var infoWindow = that.createDangerInfoWindow(jsonData);

                  infoWindow.addEventListener("open", function() {
                         $(".basic-ul li").click(function () {
                              alert("aa");
                            $(this).css({
                                "background-color": "#fff",
                                "color": "blue",
                                "border:": "0"
                            }).siblings("li").css({"background-color": "#a9dbf6", "color": "#000", "border:": "1"});
    
                            var acc = $(this).index();
                            $(this).parent().prev().children().eq(acc).siblings().addClass("displayy");
                            $(this).parent().prev().children().eq(acc).removeClass("displayy");
                        });

                   });

 

原文:https://www.cnblogs.com/kunlunmountain/p/8669330.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!