For a project I was working on, I was instructed to use a node variable to find out what element and what part of the element the mouse is hovering.
What is a node variable and how do i use it to achieve the above?
An instance or example of what i am trying to do, if it helps, is find out what element or if possible what part of an element the mouse is over. Meaning, if the mouse is hovering over a <p> in the html document, i want to know that and if possible exactly what text inside said <p> in the mouse is over. Well, i don’t need to know the words, i just want the words to be stored in a variable so i can apply CSS styles to them.
I really appreciate any and all help with this.
Thanks in Advance!
you can try
event.targetthat returns the target of the event:DEMO