views:

68

answers:

2

There is a semitransparent overlay div 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.

+1  A: 

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.

Francisco Soto
Sure, but how to determine which element's events I have to trigger?
Dmitry Gladkov
+1  A: 

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. :(

Dmitry Gladkov
It might return the semi-transparent div. May be excluding semi-transparent will do the work for you.
Biswanath
I already got it working as Nick posted his comment, but thanks.
Dmitry Gladkov