需要监听 infowindow 的打开事件 ,查看InfoWindow API 百度地图 Infowidow 内容(content 下标签) 点击事件

  实现 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");
                        });

                   });

 

相关文章:

  • 2021-11-17
  • 2021-12-18
  • 2021-11-29
  • 2021-06-28
  • 2021-08-14
  • 2021-12-23
  • 2021-12-19
  • 2021-12-13
猜你喜欢
  • 2021-07-18
  • 2021-04-05
  • 2021-04-28
  • 2021-10-23
  • 2021-12-02
  • 2021-06-22
  • 2021-06-20
  • 2021-11-20
相关资源
相似解决方案