Move javascript mouse cursor

I am creating a comic microsite for a company. They need a function in which the mouse cursor randomly changes position when the user hovers over a specific image.

Is this possible in javascript? How do I implement it?

Thanks!

+7
source share
3 answers

You cannot ... but you can - in some way.

What you can do to imitate this behavior is that you can hide the actual cursor with css cursor: none , and then create an image representing the cursor that will look the same and will be placed at the position of the real cursor. Then the user will move the mouse, you will need to update the position of the cursor image and apply your random position changes as you wish, although keep in mind that when the user scrolls outside the browser content window (on the controls or outside the browser), they will return the mouse cursor is in the actual position and your cursor will be stuck in the last position.

The only way to get this joke out. Good luck with this and hope they enjoy it;)

PS.

inverting mouse direction can be funny:>

+33
source

You cannot move the mouse cursor.

You can move the page or image relative to the cursor position, which can cause the cursor to move when it did not?

+1
source

You can change the cursor using an invisible custom icon, and then create a fake cursor and move it.

0
source

All Articles