开发者

Javascript click through element

开发者 https://www.devze.com 2023-01-08 04:18 出处:网络
There is a semitransparent overlay d开发者_StackOverflow社区iv covering document which destroys on click, but I need somehow to trigger onlick events of the element beneath overlay at the same time. I

There is a semitransparent overlay d开发者_StackOverflow社区iv covering document which destroys on click, but I need somehow to trigger onlick events of the element beneath overlay at the same time. Is there a way to click on specific coordinates with JS, or maybe determine underlying element having absolute x and y positions? Thanks.


Nick has posted a link to awesome answer on how to get elements by x and y but unfortunately it's a comment so I can't accept it. :(


If you can find out what is the element given the coordinates, you can always trigger the onclick handler yourself with jQuery using the .click() function.

0

精彩评论

暂无评论...
验证码 换一张
取 消