In my HTML, I have a div that contains an icon and some text.
I want to make it so that when I hover over the div with my mouse, only the div itself is visible to the 'elementFromPoint' function. How can I achieve this?
Here is an example of the code:
<div id="rightGazeOption_0" class="gazeLinkOption">
<i style="outline: 0px none;" class="gazeLinkOptionIcon fa fa-external-link"></i><span>ElementName</span>
</div>
var myElement = document.elementFromPoint(/*CENTER OF DIV*/);
Currently, 'myElement' could be either the "< i >" or the "< span >" element, but I want it to refer to the div itself. How can I send the < i > and < span > elements to the background so that "elementFromPoint()" only detects the main div container?
Is this possible?