javascript - Get all elements below a specific element -
in javascript, possible obtain list of elements element hovering over? i'm using element cursor, , want other elements in page underlined when cursor element hovering on each of other elements.
<div id="cursor">|----------|<br/>|----------|<br/>>i'm spaceship!><br/>|----------|<br/>|----------|<br/></div> <div id="hi">try select text</div> <p>i want automatically highlight elements cursor element hovers over.</p> <p>here's element.<p>
the :hover
pseudo-class applies whatever you're cursor over. have quick @ fiddle mouse triggers red background each element hovered: http://goo.gl/zurp6
secondly, if using element cursor, can instruct mouse pass through using pointer-events: none
rule. note, support outside of svg property limited.
other this, alternative way use elementfrompoint
, return single element. i'm not sure work since you're mouse obstructed element begin with.
regarding elementfrompoint
route, temporarily hide custom cursor next element below mouse, , turn custom cursor on, suggested in comments below.
Comments
Post a Comment