getElement by position?

前端 未结 3 1544
眼角桃花
眼角桃花 2020-12-21 04:31

I am working on SVG script

there are getElementById or getElementsByTagName

but I can\'t find any method to get elements by position

such as get the

3条回答
  •  囚心锁ツ
    2020-12-21 04:43

    You can try this:

    $("svg").find("[x='10'][y='10']");
    

    It will give all the elements with svg which have x = 10 and y = 10.

    Working demo

提交回复
热议问题