Passing mouse clicks through an overlaying HTML element <div>



Retrieve the mouse coordinates in the click event.

 Now, retrieve the element by hiding your overlay, and use the following. After that, redisplay the overlay −

document.elementFromPoint(x, y)

You can also use the following CSS −

div {
   pointer-events:none;
}
Updated on: 2020-06-25T07:05:20+05:30

996 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements