I am trying to write a script which I want to put in my html website. What this script does is that it changes text with change in mouse cursor position. For eg. if user is on (x,y)=(1,1) then some text will be displayed while if on (x,y)=(2,2) some other random text will be displayed.
var text = [ 'I am human.']
I am not sure about how to connect this to a mouse event. Like if pointer moves, display any random text from list of text. Can anyone provide the code? Will really help me. Thank You!