JQuery and SVG - how to find the 'g' tag

前端 未结 2 661
既然无缘
既然无缘 2021-01-12 13:06

Imagine this:


    
    

2条回答
  •  伪装坚强ぢ
    2021-01-12 13:07

    Thanks to C-Link I've solved this.

    To be sure only the nodes are clickable I've wroted:

    $("svg").find("g.node").click(function(){
        alert("Lolol");
    });
    

    And it works fine.

提交回复
热议问题